class CacheSchedulingMutex implements SchedulingMutex, CacheAware

Properties

string|null $store

The cache store that should be used.

Methods

__construct(Factory $cache)

Create a new scheduling strategy.

bool
create(Event $event, DateTimeInterface $time)

Attempt to obtain a scheduling mutex for the given event.

bool
exists(Event $event, DateTimeInterface $time)

Determine if a scheduling mutex exists for the given event.

bool
shouldUseLocks(Store $store)

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

useStore(string $store)

Specify the cache store that should be used.

Details

at line 24
__construct(Factory $cache)

Create a new scheduling strategy.

Parameters

Factory $cache

the cache factory implementation

at line 32
bool create(Event $event, DateTimeInterface $time)

Attempt to obtain a scheduling mutex for the given event.

Parameters

Event $event
DateTimeInterface $time

Return Value

bool

at line 55
bool exists(Event $event, DateTimeInterface $time)

Determine if a scheduling mutex exists for the given event.

Parameters

Event $event
DateTimeInterface $time

Return Value

bool

at line 76
protected bool shouldUseLocks(Store $store)

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

Parameters

Store $store

Return Value

bool

at line 87
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