class CacheEventMutex implements EventMutex, CacheAware

Properties

string|null $store

The cache store that should be used.

Methods

__construct(Factory $cache)

Create a new overlapping strategy.

bool
create(Event $event)

Attempt to obtain an event mutex for the given event.

bool
exists(Event $event)

Determine if an event mutex exists for the given event.

void
forget(Event $event)

Clear the event mutex for the given event.

bool
shouldUseLocks(Store $store)

Determine if the given store should use locks for cache event mutexes.

useStore(string $store)

Specify the cache store that should be used.

Details

at line 23
__construct(Factory $cache)

Create a new overlapping strategy.

Parameters

Factory $cache

the cache repository implementation

at line 31
bool create(Event $event)

Attempt to obtain an event mutex for the given event.

Parameters

Event $event

Return Value

bool

at line 52
bool exists(Event $event)

Determine if an event mutex exists for the given event.

Parameters

Event $event

Return Value

bool

at line 69
void forget(Event $event)

Clear the event mutex for the given event.

Parameters

Event $event

Return Value

void

at line 90
protected bool shouldUseLocks(Store $store)

Determine if the given store should use locks for cache event mutexes.

Parameters

Store $store

Return Value

bool

at line 101
CacheAware useStore(string $store)

Specify the cache store that should be used.

Boot-only. Mutates the shared mutex instance for the worker lifetime; per-request use races across coroutines.

Parameters

string $store

Return Value

CacheAware