Xcache storage engine for cache
$settings
public array
Populates and reverses $_SERVER authentication values Makes necessary changes (and reverting them back) in $_SERVER
Write data for key into cache if it doesn't exist already. If it already exists, it fails and returns false.
Increments the group value to simulate deletion of all keys under a group old values will remain in storage until they expire.
Decrements the value of an integer cached key. If the cache key is not an integer it will be treated as 0
Returns the group value
for each of the configured groups If the group initial value was not found, then it initializes the group accordingly.
Increments the value of an integer cached key If the cache key is not an integer it will be treated as 0
_auth( boolean $reverse false )
Populates and reverses $_SERVER authentication values Makes necessary changes (and reverting them back) in $_SERVER
This has to be done because xcache_clear_cache() needs to pass Basic Http Auth (see xcache.admin configuration settings)
$reverse
optional false add( string $key , mixed $value , integer $duration )
Write data for key into cache if it doesn't exist already. If it already exists, it fails and returns false.
$key
$value
$duration
CacheEngine::add()
clear( boolean $check )
Delete all keys from the cache
$check
If true no deletes will occur and instead CakePHP will rely on key TTL values.
clearGroup( string $group )
Increments the group value to simulate deletion of all keys under a group old values will remain in storage until they expire.
$group
CacheEngine::clearGroup()
decrement( string $key , integer $offset 1 )
Decrements the value of an integer cached key. If the cache key is not an integer it will be treated as 0
$key
$offset
optional 1 delete( string $key )
Delete a key from the cache
$key
groups( )
Returns the group value
for each of the configured groups If the group initial value was not found, then it initializes the group accordingly.
CacheEngine::groups()
increment( string $key , integer $offset 1 )
Increments the value of an integer cached key If the cache key is not an integer it will be treated as 0
$key
$offset
optional 1 init( array $settings array() )
Initialize the Cache Engine
Called automatically by the cache frontend To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
$settings
optional array() CacheEngine::init()
read( string $key )
Read a key from the cache
$key
write( string $key , mixed $value , integer $duration )
Write data for key into cache
$key
$value
$duration
gc( integer $expires null )
Garbage collection
Permanently remove all expired and deleted data
$expires
optional null key( string $key )
Generates a safe key for use with cache engine storage engines.
$key
public array
Settings
array()
© 2005–2016 The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/2.9/class-XcacheEngine.html