* Update the HandleResourceRequest function to mimic the HandleQueryRequest function
* Remove CacheResourceResponse function from interface
* revert additional thing I missed
// The cached data response associated with a query, or nil if no cached data is found
@ -25,6 +26,15 @@ type CachedQueryDataResponse struct {
UpdateCacheFnCacheQueryResponseFn
}
typeCachedResourceDataResponsestruct{
// The cached response associated with a resource request, or nil if no cached data is found
Response*backend.CallResourceResponse
// A function that should be used to cache a CallResourceResponse for a given resource request.
// It can be set to nil by the method implementation (if there is an error, for example), so it should be checked before being called.
// Because plugins can send multiple responses asyncronously, the implementation should be able to handle multiple calls to this function for one request.
// HandleResourceRequest uses a CallResourceRequest to check the cache for any existing results for that request. If none are found, it should return false.
// This function may populate any response headers (accessible through the context) with the cache status using the X-Cache header.
// CacheResourceResponse is used to cache resource responses for a resource request.
// Because plugins can send multiple responses asyncronously, the implementation should be able to handle multiple calls to this function for one request.