class CacheWatcher extends Watcher

Properties

static protected bool $eventsEnabled

Indicates if the cache event is enabled.

Methods

__construct(array $options = [])

Create a new watcher instance.

from  Watcher
void
register(Application $app)

Register the watcher.

setOptions(array $options)

Set the watcher options.

from  Watcher
static void
enableCacheEvents(Application $app)

Enable Cache events.

void
recordCacheHit(CacheHit $event)

Record a cache key was found.

void
recordCacheMissed(CacheMissed $event)

Record a missing cache key.

void
recordKeyWritten(KeyWritten $event)

Record a cache key was updated.

void
recordKeyForgotten(KeyForgotten $event)

Record a cache key was forgotten / removed.

int|null
formatExpiration(KeyWritten $event)

No description

static void
flushState()

Flush all static state.

Details

in Watcher at line 16
__construct(array $options = [])

Create a new watcher instance.

Parameters

array $options

the configured watcher options

at line 28
void register(Application $app)

Register the watcher.

Parameters

Application $app

Return Value

void

in Watcher at line 29
Watcher setOptions(array $options)

Set the watcher options.

Parameters

array $options

Return Value

Watcher

at line 49
static void enableCacheEvents(Application $app)

Enable Cache events.

Boot-only. Must be called before the Cache is initialized. Mutates process-global config and a static flag; runtime use races across coroutines.

Parameters

Application $app

Return Value

void

at line 62
void recordCacheHit(CacheHit $event)

Record a cache key was found.

Parameters

CacheHit $event

Return Value

void

at line 78
void recordCacheMissed(CacheMissed $event)

Record a missing cache key.

Parameters

CacheMissed $event

Return Value

void

at line 93
void recordKeyWritten(KeyWritten $event)

Record a cache key was updated.

Parameters

KeyWritten $event

Return Value

void

at line 110
void recordKeyForgotten(KeyForgotten $event)

Record a cache key was forgotten / removed.

Parameters

KeyForgotten $event

Return Value

void

at line 143
protected int|null formatExpiration(KeyWritten $event)

No description

Parameters

KeyWritten $event

Return Value

int|null

at line 163
static void flushState()

Flush all static state.

Return Value

void