class ModelCacheCoordinator

Coordinate shared model cache fills and exact invalidations.

Constants

private FILL_LOCK_SECONDS

The duration of a model cache fill lock.

private INVALIDATION_WAIT_SECONDS

The maximum time an invalidation waits for a fill lock.

private INVALIDATION_RETRY_MILLISECONDS

The delay between invalidation lock acquisition attempts.

private ENVELOPE_MARKER_KEY

The envelope marker key.

private ENVELOPE_MARKER_VALUE

The envelope marker value.

private ENVELOPE_VALUE_KEY

The envelope value key.

Methods

mixed
fill(Repository $cache, string $key, int $ttl, Closure $read, bool $cacheNull = true, Closure|null $writeCache = null)

Retrieve or fill a shared model cache entry.

bool
invalidate(Repository $cache, string $key)

Invalidate an exact shared model cache entry.

Details

at line 54
mixed fill(Repository $cache, string $key, int $ttl, Closure $read, bool $cacheNull = true, Closure|null $writeCache = null)

Retrieve or fill a shared model cache entry.

Parameters

Repository $cache
string $key
int $ttl
Closure $read
bool $cacheNull
Closure|null $writeCache

Return Value

mixed

at line 103
bool invalidate(Repository $cache, string $key)

Invalidate an exact shared model cache entry.

Parameters

Repository $cache
string $key

Return Value

bool