Documentation

CallbackCanCacheStrategy extends DefaultCanCacheStrategy
in package

Determines if a request can be cached using a callback

Table of Contents

$requestCallback  : callable
$responseCallback  : callable
__construct()  : mixed
canCacheRequest()  : bool
Determine if a request can be cached
canCacheResponse()  : bool
Determine if a response can be cached

Properties

Methods

__construct()

public __construct([Closure|array<string|int, mixed>|mixed $requestCallback = null ][, Closure|array<string|int, mixed>|mixed $responseCallback = null ]) : mixed
Parameters
$requestCallback : Closure|array<string|int, mixed>|mixed = null

Callable method to invoke for requests

$responseCallback : Closure|array<string|int, mixed>|mixed = null

Callable method to invoke for responses

Tags
throws
InvalidArgumentException
Return values
mixed

canCacheResponse()

Determine if a response can be cached

public canCacheResponse(Response $response) : bool
Parameters
$response : Response

Response to determine

Return values
bool

Search results