File Storage engine for cache. Filestorage is the slowest cache storage to read and write. However, it is good for servers that don't have other storage engine available, or have content which is not performance sensitive.
You can configure a FileEngine cache, using Cache::config()
_clearDirectory( string $path , integer $now , integer $threshold )
Used to clear a directory of matching files.
$path
$now
$threshold
_setKey( string $key , boolean $createKey false )
Sets the current cache key this class is managing, and creates a writable SplFileObject for the cache file the key is referring to.
$key
$createKey
optional false boolean
clear( boolean $check )
Delete all values from the cache
$check
boolean
clearGroup( string $group )
Recursively deletes all files under any directory named as $group
$group
boolean
CacheEngine::clearGroup()
decrement( string $key , integer $offset 1 )
Not implemented
$key
$offset
optional 1 CacheException
delete( string $key )
Delete a key from the cache
$key
boolean
gc( integer $expires null )
Garbage collection. Permanently remove all expired and deleted data
$expires
optional null boolean
CacheEngine::gc()
increment( string $key , integer $offset 1 )
Not implemented
$key
$offset
optional 1 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()
key( string $key )
Generates a safe key for use with cache engine storage engines.
$key
mixed
CacheEngine::key()
read( string $key )
Read a key from the cache
$key
mixed
write( string $key , mixed $data , integer $duration )
Write data for key into cache
$key
$data
$duration
boolean
groups( )
Does whatever initialization for each group is required and returns the group value
for each of them, this is the token representing each group in the cache key
array
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-FileEngine.html