Свойство | Type | Description | |
---|---|---|---|
$cacheStorage | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | ||
$client | |||
$httpMethods | array | List of allowed HTTP methods to cache Key = method name (upscaling) Value = true. | |
$waitingRevalidate | of Promise |
Méthode | Description | |
---|---|---|
__construct ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStrategy = null ) | ||
__invoke ( callable $handler ) : callable | ||
getCacheStorage ( ) : Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | ||
getHttpMethods ( ) | ||
getMiddleware ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStorage = null ) : |
||
purgeReValidation ( ) | Will be called at the end of the script. | |
setCacheStorage ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStorage ) | ||
setClient ( |
||
setHttpMethods ( array $methods ) |
Méthode | Description | |
---|---|---|
addReValidationRequest ( Psr\Http\Message\RequestInterface $request, Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface &$cacheStorage, |
||
addToCache ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cache, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, boolean $update = false ) : Psr\Http\Message\ResponseInterface | ||
getRequestWithReValidationHeader ( Psr\Http\Message\RequestInterface $request, |
||
getStaleResponse ( |
public __construct ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStrategy = null ) | ||
$cacheStrategy | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface |
protected addReValidationRequest ( Psr\Http\Message\RequestInterface $request, Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface &$cacheStorage, |
||
$request | Psr\Http\Message\RequestInterface | |
$cacheStorage | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | |
$cacheEntry | ||
Résultat | boolean | if added |
protected static addToCache ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cache, Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, boolean $update = false ) : Psr\Http\Message\ResponseInterface | ||
$cache | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | |
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$update | boolean | cache |
Résultat | Psr\Http\Message\ResponseInterface |
public getCacheStorage ( ) : Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | ||
Résultat | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface |
public static getMiddleware ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStorage = null ) : |
||
$cacheStorage | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface | |
Résultat | the Middleware for Guzzle HandlerStack |
protected static getRequestWithReValidationHeader ( Psr\Http\Message\RequestInterface $request, |
||
$request | Psr\Http\Message\RequestInterface | |
$cacheEntry | ||
Résultat | Psr\Http\Message\RequestInterface |
protected static getStaleResponse ( |
||
$cacheEntry | ||
Résultat | null | Psr\Http\Message\ResponseInterface |
public purgeReValidation ( ) |
public setCacheStorage ( Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface $cacheStorage ) | ||
$cacheStorage | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface |
protected CacheStrategyInterface,Kevinrob\GuzzleCache\Strategy $cacheStorage | ||
Résultat | Kevinrob\GuzzleCache\Strategy\CacheStrategyInterface |
protected array $httpMethods | ||
Résultat | array |