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.

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 28
HasCaching enableCaching()

Enable caching for this request.

Return Value

HasCaching

at line 40
HasCaching disableCaching()

Disable caching for this request.

Return Value

HasCaching

at line 52
HasCaching invalidateCache()

Invalidate and refresh the matching cache entry.

Return Value

HasCaching

at line 62
UnitEnum|string|null cacheStore()

Get the cache store name.

Return Value

UnitEnum|string|null

at line 72
final bool usesCachingControls()

internal  
 

Determine if this request defines cache controls.

Return Value

bool

at line 82
final bool cachingEnabled()

internal  
 

Determine if request caching is enabled.

Return Value

bool

at line 92
final bool shouldInvalidateCache()

internal  
 

Determine if the matching entry should be invalidated.

Return Value

bool

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

internal  
 

Resolve the custom cache key.

Parameters

PendingRequest $pendingRequest

Return Value

string|null

at line 113
final array|null resolveCacheableMethods()

internal  
 

Resolve the cacheable HTTP methods.

Return Value

array|null

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

Define a custom cache key.

Parameters

PendingRequest $pendingRequest

Return Value

string|null

at line 131
protected array|null cacheableMethods()

Define the cacheable HTTP methods.

Return Value

array|null