Méthode | Description | |
---|---|---|
__construct ( Psr\Cache\CacheItemPoolInterface $cache ) | Set the psr-6 cache pool. | |
__invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | Execute the middleware. | |
cacheControl ( string | Micheh\Cache\Header\CacheControl $cacheControl ) : self | Set a cache-control header to all responses. |
Méthode | Description | |
---|---|---|
getCacheKey ( Psr\Http\Message\RequestInterface $request ) : string | Returns the id used to cache a request. |
public __construct ( Psr\Cache\CacheItemPoolInterface $cache ) | ||
$cache | Psr\Cache\CacheItemPoolInterface |
public __invoke ( Psr\Http\Message\RequestInterface $request, Psr\Http\Message\ResponseInterface $response, callable $next ) : Psr\Http\Message\ResponseInterface | ||
$request | Psr\Http\Message\RequestInterface | |
$response | Psr\Http\Message\ResponseInterface | |
$next | callable | |
Résultat | Psr\Http\Message\ResponseInterface |
public cacheControl ( string | Micheh\Cache\Header\CacheControl $cacheControl ) : self | ||
$cacheControl | string | Micheh\Cache\Header\CacheControl | |
Résultat | self |