StateL1Interface
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
Records a cache-hit event in the driver.
Accessor for the aggregated value of cache-hit events on the driver.
Records a cache-miss event in the driver.
Accessor for the aggregated value of cache-miss events on the driver.
Stores the last applied cache mutation event id in the L1 cache.
Accessor for the last applied event id on the L1 driver.
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.
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.
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.
at line line 68
int
getLastAppliedEventID()
Accessor for the last applied event id on the L1 driver.
at line line 75
clear()
Clears the collected statistical data.