(no description)
File Size: | 404 lines (14 kb) |
Included or required: | 0 times |
Referenced: | 0 times |
Includes or requires: | 0 files |
CacheMiddleware:: (14 methods):
__construct()
setClient()
setCacheStorage()
getCacheStorage()
setHttpMethods()
getHttpMethods()
purgeReValidation()
__invoke()
addToCache()
addReValidationRequest()
getStaleResponse()
getRequestWithReValidationHeader()
getMiddleware()
invalidateCache()
Class: CacheMiddleware - X-Ref
Class CacheMiddleware.__construct(CacheStrategyInterface $cacheStrategy = null) X-Ref |
param: CacheStrategyInterface|null $cacheStrategy |
setClient(Client $client) X-Ref |
param: Client $client |
setCacheStorage(CacheStrategyInterface $cacheStorage) X-Ref |
param: CacheStrategyInterface $cacheStorage |
getCacheStorage() X-Ref |
return: CacheStrategyInterface |
setHttpMethods(array $methods) X-Ref |
param: array $methods |
getHttpMethods() X-Ref |
No description |
purgeReValidation() X-Ref |
Will be called at the end of the script. |
__invoke(callable $handler) X-Ref |
param: callable $handler return: callable |
addToCache(CacheStrategyInterface $cache,RequestInterface $request,ResponseInterface $response,$update = false) X-Ref |
No description |
addReValidationRequest(RequestInterface $request,CacheStrategyInterface &$cacheStorage,CacheEntry $cacheEntry) X-Ref |
param: RequestInterface $request param: CacheStrategyInterface $cacheStorage param: CacheEntry $cacheEntry return: bool if added |
getStaleResponse(CacheEntry $cacheEntry = null) X-Ref |
param: CacheEntry|null $cacheEntry return: null|ResponseInterface |
getRequestWithReValidationHeader(RequestInterface $request, CacheEntry $cacheEntry) X-Ref |
param: RequestInterface $request param: CacheEntry $cacheEntry return: RequestInterface |
getMiddleware(CacheStrategyInterface $cacheStorage = null) X-Ref |
param: CacheStrategyInterface|null $cacheStorage return: CacheMiddleware the Middleware for Guzzle HandlerStack |
invalidateCache(RequestInterface $request, ResponseInterface $response) X-Ref |
param: RequestInterface $request param: ResponseInterface $response return: ResponseInterface |