XOOPS
2.6.0
|
Public Member Functions | |
__construct (PoolInterface $pool) | |
cacheRead ($cacheKey, $regenFunction, $ttl=null, $args=null) | |
clear () | |
delete ($key) | |
garbageCollect () | |
pool () | |
read ($key) | |
write ($key, $value, $ttl=null) | |
Protected Attributes | |
$pool = null | |
Definition at line 28 of file Access.php.
Xoops\Core\Cache\Access::__construct | ( | PoolInterface | $pool | ) |
__construct
type | PoolInterface $pool cache pool to use for this cache instance |
Definition at line 42 of file Access.php.
References Xoops\Core\Cache\Access\$pool, and Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::cacheRead | ( | $cacheKey, | |
$regenFunction, | |||
$ttl = null , |
|||
$args = null |
|||
) |
cache block wrapper using Invalidation::PRECOMPUTE
If the cache read for $key is a miss, call the $regenFunction to update it. With the PRECOMPUTE strategy, it will trigger a miss on a read on one caller before the cache expires, so it will be done in advance.
string|string[] | $cacheKey Identifier for the cache item | |
callable | $regenFunction | function to generate cached content |
int | DateTime | null | $ttl | time to live, number ofseconds as integer, DateTime to expire at a specific time, or null for default |
mixed | ...$args variable argument list for $regenFunction |
Definition at line 107 of file Access.php.
References Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::clear | ( | ) |
clear all keys and data from the cache.
Definition at line 154 of file Access.php.
References Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::delete | ( | $key | ) |
Delete a key from the cache.
string|string[] | $key Identifier for the cache item |
Definition at line 85 of file Access.php.
References Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::garbageCollect | ( | ) |
Garbage collection - remove all expired and deleted data
Definition at line 144 of file Access.php.
References Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::pool | ( | ) |
direct access to pool
WARNING: this is intended for diagnostics and similar advanced uses. Depending on direct access to the pool may break future compatibility.
Definition at line 167 of file Access.php.
References Xoops\Core\Cache\Access\$pool.
Referenced by Xoops\Core\Cache\Access\__construct(), Xoops\Core\Cache\Access\cacheRead(), Xoops\Core\Cache\Access\clear(), Xoops\Core\Cache\Access\delete(), Xoops\Core\Cache\Access\garbageCollect(), Xoops\Core\Cache\Access\read(), and Xoops\Core\Cache\Access\write().
Xoops\Core\Cache\Access::read | ( | $key | ) |
Read a key from the cache.
string|string[] | $key Identifier for the cache item |
Definition at line 71 of file Access.php.
References NONE, and Xoops\Core\Cache\Access\pool().
Xoops\Core\Cache\Access::write | ( | $key, | |
$value, | |||
$ttl = null |
|||
) |
Write data for key into cache.
string|string[] | $key Identifier for the cache item | |
mixed | $value | Data to be cached - anything except a resource |
int | DateTime | null | $ttl | time to live, integer for ttl in seconds, DateTime object to expire at a specific time, or null for |
Definition at line 58 of file Access.php.
References Xoops\Core\Cache\Access\pool().
|
protected |
Definition at line 35 of file Access.php.
Referenced by Xoops\Core\Cache\Access\__construct(), and Xoops\Core\Cache\Access\pool().