Memcache storage engine for cache. Memcache has some limitations in the amount of control you have over expire times far in the future. See MemcacheEngine::write() for more information.
_parseServerString( string $server )
Parses the server address into the host/port. Handles both IPv6 and IPv4 addresses and Unix sockets
$server
array
clear( boolean $check )
Delete all keys from the cache
$check
boolean
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
boolean
CacheEngine::clearGroup()
connect( string $host , integer $port 11211 )
Connects to a server in connection pool
$host
$port
optional 11211 boolean
decrement( string $key , integer $offset 1 )
Decrements the value of an integer cached key
$key
$offset
optional 1 New
CacheException
delete( string $key )
Delete a key from the cache
$key
boolean
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.
array
CacheEngine::groups()
increment( string $key , integer $offset 1 )
Increments the value of an integer cached key
$key
$offset
optional 1 New
CacheException
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() boolean
CacheEngine::init()
read( string $key )
Read a key from the cache
$key
mixed
write( string $key , mixed $value , integer $duration )
Write data for key into cache. When using memcache as your cache engine remember that the Memcache pecl extension does not support cache expiry times greater than 30 days in the future. Any duration greater than 30 days will be treated as never expiring.
$key
$value
$duration
boolean
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
mixed
protected string
Contains the compiled string with all groups prefixes to be prepended to every key in this cache engine
null
© 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.
http://api.cakephp.org/2.7/class-MemcacheEngine.html