PHP Class Kevinrob\GuzzleCache\Strategy\GreedyCacheStrategy
It can be used to cache responses in spite of any cache related response headers,
but it SHOULDN'T be used unless absolutely necessary, e.g. when accessing
badly designed APIs without Cache control.
Obviously, this follows no RFC :(.
Afficher le fichier
Open project: kevinrob/guzzle-cache-middleware
Protected Properties
Méthodes publiques
Méthode |
Description |
|
__construct ( Kevinrob\GuzzleCache\Storage\CacheStorageInterface $cache = null, $ttl ) |
|
|
cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) |
|
|
fetch ( Psr\Http\Message\RequestInterface $request ) |
|
|
Méthodes protégées
Méthode |
Description |
|
getCacheKey ( Psr\Http\Message\RequestInterface $request ) |
|
|
getCacheObject ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) |
|
|
Method Details
__construct()
public méthode
public __construct ( Kevinrob\GuzzleCache\Storage\CacheStorageInterface $cache = null, $ttl ) |
$cache |
Kevinrob\GuzzleCache\Storage\CacheStorageInterface |
|
public cache ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) |
$request |
Psr\Http\Message\RequestInterface |
|
$response |
Psr\Http\Message\ResponseInterface |
|
public fetch ( Psr\Http\Message\RequestInterface $request ) |
$request |
Psr\Http\Message\RequestInterface |
|
getCacheKey()
protected méthode
protected getCacheKey ( Psr\Http\Message\RequestInterface $request ) |
$request |
Psr\Http\Message\RequestInterface |
|
getCacheObject()
protected méthode
protected getCacheObject ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response ) |
$request |
Psr\Http\Message\RequestInterface |
|
$response |
Psr\Http\Message\ResponseInterface |
|
Property Details
$ttl protected_oe property
protected int $ttl |
Résultat |
integer |
|