ResponseCache
class ResponseCache
Constants
| MAX_TTL_MS |
|
Methods
__construct(string|null $store = null, string|null $for = null)
Create a response cache for the given store and private scope.
array
void
bool
cacheable(string $method, array $params)
Determine whether the request permits response caching.
string
key(array $recipe, string $method, array $params, CacheScope $scope)
Build a cache key for the endpoint, request and scope.
string
hash(mixed $value)
Hash cache inputs, which may include credentials.
Details
at line 22
__construct(string|null $store = null, string|null $for = null)
Create a response cache for the given store and private scope.
at line 35
array
remember(Method $method, Transport $transport, Closure $fetch)
Retrieve a cached response or remember an eligible server result.
at line 81
void
forget(Method $method, Transport $transport)
Forget both cache scopes for a request whose response is stale.
at line 97
protected bool
cacheable(string $method, array $params)
Determine whether the request permits response caching.
at line 111
protected string
key(array $recipe, string $method, array $params, CacheScope $scope)
Build a cache key for the endpoint, request and scope.
at line 127
protected string
hash(mixed $value)
Hash cache inputs, which may include credentials.