interface StateL1Interface (View source)

Interface for the state manager drivers used in L1 driver implementations.

This interface is separated from L1 drivers, due to the need to separate L1 storage implementations from L1 statistics storage. It was proven that L1 SQLite driver implementation is much slower, unless APCu is used for the events data tracking. This pushed the need to separate statistics storage from the main storage of L1 data and to allow free combinations between them.

Methods

recordHit()

Records a cache-hit event in the driver.

int
getHits()

Accessor for the aggregated value of cache-hit events on the driver.

recordMiss()

Records a cache-miss event in the driver.

int
getMisses()

Accessor for the aggregated value of cache-miss events on the driver.

setLastAppliedEventID(int $eventId)

Stores the last applied cache mutation event id in the L1 cache.

int
getLastAppliedEventID()

Accessor for the last applied event id on the L1 driver.

clear()

Clears the collected statistical data.

Details

at line line 26
recordHit()

Records a cache-hit event in the driver.

at line line 34
int getHits()

Accessor for the aggregated value of cache-hit events on the driver.

Return Value

int The cache-hits count.

at line line 39
recordMiss()

Records a cache-miss event in the driver.

at line line 47
int getMisses()

Accessor for the aggregated value of cache-miss events on the driver.

Return Value

int The cache-misses count.

at line line 58
setLastAppliedEventID(int $eventId)

Stores the last applied cache mutation event id in the L1 cache.

This is needed, so on consecuitive requests, we should apply all events newer than this one.

Parameters

int $eventId Event ID to store for future reference.

at line line 68
int getLastAppliedEventID()

Accessor for the last applied event id on the L1 driver.

Return Value

int The EventID stored or NULL.

See also

StateL1Interface::setLastAppliedEventID($eventId)

at line line 75
clear()

Clears the collected statistical data.