trait HasCaching

Properties

protected bool $cachingEnabled

Whether caching is enabled for this request.

protected bool $invalidateCache

Whether the matching cache entry should be invalidated.

Methods

enableCaching()

Enable caching for this request.

disableCaching()

Disable caching for this request.

invalidateCache()

Invalidate and refresh the matching cache entry.

void
clearCache(Connector $counterpart)

Clear the cached response without sending the request.

UnitEnum|string|null
cacheStore()

Get the cache store name.

bool
usesCachingControls()

Determine if this request defines cache controls.

bool
cachingEnabled()

Determine if request caching is enabled.

bool
shouldInvalidateCache()

Determine if the matching entry should be invalidated.

string|null
resolveCacheKey(PendingRequest $pendingRequest)

Resolve the custom cache key.

array|null
resolveCacheableMethods()

Resolve the cacheable HTTP methods.

string|null
cacheKey(PendingRequest $pendingRequest)

Define a custom cache key.

array|null
cacheableMethods()

Define the cacheable HTTP methods.

Details

at line 29
HasCaching enableCaching()

Enable caching for this request.

Return Value

HasCaching

at line 41
HasCaching disableCaching()

Disable caching for this request.

Return Value

HasCaching

at line 53
HasCaching invalidateCache()

Invalidate and refresh the matching cache entry.

Return Value

HasCaching

at line 63
void clearCache(Connector $counterpart)

Clear the cached response without sending the request.

Parameters

Connector $counterpart

Return Value

void

at line 71
UnitEnum|string|null cacheStore()

Get the cache store name.

Return Value

UnitEnum|string|null

at line 81
final bool usesCachingControls()

internal  
 

Determine if this request defines cache controls.

Return Value

bool

at line 91
final bool cachingEnabled()

internal  
 

Determine if request caching is enabled.

Return Value

bool

at line 101
final bool shouldInvalidateCache()

internal  
 

Determine if the matching entry should be invalidated.

Return Value

bool

at line 111
final string|null resolveCacheKey(PendingRequest $pendingRequest)

internal  
 

Resolve the custom cache key.

Parameters

PendingRequest $pendingRequest

Return Value

string|null

at line 122
final array|null resolveCacheableMethods()

internal  
 

Resolve the cacheable HTTP methods.

Return Value

array|null

at line 130
protected string|null cacheKey(PendingRequest $pendingRequest)

Define a custom cache key.

Parameters

PendingRequest $pendingRequest

Return Value

string|null

at line 140
protected array|null cacheableMethods()

Define the cacheable HTTP methods.

Return Value

array|null