Class CacheEngine
Storage engine for CakePHP caching
Direct Subclasses
		Abstract
Package: Cake\Cache
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Cache/Cache.php
	
	Package: Cake\Cache
Copyright: Copyright 2005-2011, Cake Software Foundation, Inc. (http://cakefoundation.org)
License: License (http://www.opensource.org/licenses/mit-license.php)
Location: Cake/Cache/Cache.php
Properties summary
- 
			$settingspublicarraySettings of current engine instance
Method Summary
- 
			clear() abstract publicDelete all keys from the cache
- 
			decrement() abstract publicDecrement a number under the key and return decremented value
- 
			delete() abstract publicDelete a key from the cache
- 
			gc() publicGarbage collection
- 
			increment() abstract publicIncrement a number under the key and return incremented value
- 
			init() publicInitialize the cache engine
- 
			key() publicGenerates a safe key for use with cache engine storage engines.
- 
			read() abstract publicRead a key from the cache
- 
			settings() publicCache Engine settings
- 
			write() abstract publicWrite value for a key into cache
Method Detail
clear() abstract public ¶
clear( boolean $check )
Delete all keys from the cache
Parameters
- boolean $check
- if true will check expiration, otherwise delete all
Returns
					boolean
True if the cache was successfully cleared, false otherwise
				
		True if the cache was successfully cleared, false otherwise
decrement() abstract public ¶
decrement( string $key , integer $offset = 1 )
Decrement a number under the key and return decremented value
Parameters
- string $key
- Identifier for the data
- integer $offset optional 1
- How much to subtract
Returns
					New
incremented value, false otherwise
				
		incremented value, false otherwise
delete() abstract public ¶
delete( string $key )
Delete a key from the cache
Parameters
- string $key
- Identifier for the data
Returns
					boolean
True if the value was successfully deleted, false if it didn't exist or couldn't be removed
				
		True if the value was successfully deleted, false if it didn't exist or couldn't be removed
increment() abstract public ¶
increment( string $key , integer $offset = 1 )
Increment a number under the key and return incremented value
Parameters
- string $key
- Identifier for the data
- integer $offset optional 1
- How much to add
Returns
					New
incremented value, false otherwise
				
		incremented value, false otherwise
init() public ¶
init( array $settings = array() )
Initialize the cache engine
Called automatically by the cache frontend
Parameters
- array $settings optional array()
- Associative array of parameters 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
key() public ¶
key( string $key )
Generates a safe key for use with cache engine storage engines.
Parameters
- string $key
- the key passed over
Returns
					mixed
string $key or false
				
		string $key or false
read() abstract 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
write() abstract public ¶
write( string $key , mixed $value , mixed $duration )
Write value for a key into cache
Parameters
- string $key
- Identifier for the data
- mixed $value
- Data to be cached
- mixed $duration
- How long to cache for.
Returns
					boolean
True if the data was successfully cached, false on failure
				
		True if the data was successfully cached, false on failure
