Class ApcEngine
APC storage engine for cache
- CacheEngine
- ApcEngine
Package: cake\cake\libs\cache
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: cache/apc.php
Copyright: Copyright 2005-2012, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: cache/apc.php
Inherited Properties
Method Summary
-
clear() public
Delete all keys from the cache -
decrement() public
Decrements the value of an integer cached key -
delete() public
Delete a key from the cache -
increment() public
Increments the value of an integer cached key -
init() public
Initialize the Cache Engine -
read() public
Read a key from the cache -
write() public
Write data for key into cache
Method Detail
clear() public ¶
clear( )
Delete all keys from the cache
Returns
boolean
True if the cache was succesfully cleared, false otherwise
True if the cache was succesfully cleared, false otherwise
Overrides
decrement() public ¶
decrement( string $key , integer $offset = 1 , integer $duration ,… )
Decrements the value of an integer cached key
Parameters
- string $key
- Identifier for the data
- integer $offset optional 1
- How much to substract
- integer $duration ,…
- How long to cache the data, in seconds
Returns
New
decremented value, false otherwise
decremented value, false otherwise
Overrides
delete() public ¶
delete( string $key )
Delete a key from the cache
Parameters
- string $key
- Identifier for the data
Returns
boolean
True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
True if the value was succesfully deleted, false if it didn't exist or couldn't be removed
Overrides
increment() public ¶
increment( string $key , integer $offset = 1 , integer $duration ,… )
Increments the value of an integer cached key
Parameters
- string $key
- Identifier for the data
- integer $offset optional 1
- How much to increment
- integer $duration ,…
- How long to cache the data, in seconds
Returns
New
incremented value, false otherwise
incremented value, false otherwise
Overrides
init() public ¶
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());
Parameters
- array $settings optional array()
- $setting array of setting for the engine
Returns
boolean
True if the engine has been successfully initialized, false if not
True if the engine has been successfully initialized, false if not
See
CacheEngine::__defaults
Overrides
read() public ¶
read( string $key )
Read a key from the cache
Parameters
- string $key
- Identifier for the data
Returns
mixed
The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it
The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it
Overrides
write() public ¶
write( string $key , mixed $value , integer $duration )
Write data for key into cache
Parameters
- string $key
- Identifier for the data
- mixed $value
- Data to be cached
- integer $duration
- How long to cache the data, in seconds
Returns
boolean
True if the data was succesfully cached, false on failure
True if the data was succesfully cached, false on failure