FileEngine Class Info:
- Class Declaration:
class FileEngine extends CacheEngine
- File name:
- cake/libs/cache/file.php
- Description:
File Storage engine for cache
- Class Inheritance
- Todo
use the File and Folder classes (if it's not a too big performance hit)
- Package
- cake
- Subpackage
- cake.cake.libs.cache
Properties:
-
_File File
Instance of File class
-
_init boolean
True unless FileEngine::__active(); fails
-
settings array
Settings
- path = absolute path to cache directory, default => CACHE
- prefix = string prefix for filename, default => cake_
- lock = enable file locking on write, default => false
- serialize = serialize the data, default => true
clear
topDelete all values from the cache
- Parameters:
-
-
boolean $check required
Optional - only delete expired cache items
-
- Method defined in:
- cake/libs/cache/file.php on line 203
- Return
boolean True if the cache was succesfully cleared, false otherwise
- Access
public
decrement
topDecrement a number under the key and return decremented value
- Parameters:
-
-
string $key required
Identifier for the data
-
$offset optional 1
-
- Method defined in:
- cake/libs/cache.php on line 655
- Return
New incremented value, false otherwise
- Access
public
delete
topDelete a key from the cache
- Parameters:
-
-
string $key required
Identifier for the data
-
- Method defined in:
- cake/libs/cache/file.php on line 189
- Return
boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed
- Access
public
gc
topGarbage collection. Permanently remove all expired and deleted data
- Method defined in:
- cake/libs/cache/file.php on line 103
- Return
boolean True if garbage collection was succesful, false on failure
- Access
public
increment
topIncrement a number under the key and return incremented value
- Parameters:
-
-
string $key required
Identifier for the data
-
integer $offset optional 1
How much to add
-
- Method defined in:
- cake/libs/cache.php on line 644
- Return
New incremented value, false otherwise
- Access
public
init
topInitialize the Cache Engine
Called automatically by the cache frontend To reinitialize the settings call Cache::engine('EngineName', [optional] settings = array());
- Parameters:
-
-
$settings optional array ( )
-
- Method defined in:
- cake/libs/cache/file.php on line 74
- Return
boolean True if the engine has been successfully initialized, false if not
- Access
public
key
topGenerates a safe key for use with cache engine storage engines.
- Parameters:
-
-
string $key required
the key passed over
-
- Method defined in:
- cake/libs/cache.php on line 695
- Return
mixed string $key or false
- Access
public
read
topRead a key from the cache
- Parameters:
-
-
string $key required
Identifier for the data
-
- Method defined in:
- cake/libs/cache/file.php on line 156
- Return
mixed The cached data, or false if the data doesn't exist, has expired, or if there was an error fetching it
- Access
public
settings
topCache Engine settings
- Method defined in:
- cake/libs/cache.php on line 684
- Return
array settings
- Access
public
write
topWrite data for key into cache
- Parameters:
-
-
string $key required
Identifier for the data
-
mixed $data required
Data to be cached
-
mixed $duration required
How long to cache the data, in seconds
-
- Method defined in:
- cake/libs/cache/file.php on line 116
- Return
boolean True if the data was succesfully cached, false on failure
- Access
public