FileEngine Class Reference

Inheritance diagram for FileEngine:

CacheEngine Object List of all members.

Public Member Functions

 __active ()
 __setKey ($key)
 clear ($check)
 delete ($key)
 gc ()
 init ($settings=array())
 read ($key)
 write ($key, &$data, $duration)

Public Attributes

 $__active = false
 $__File = null
 $__init = true
 $settings = array()

Detailed Description

Definition at line 33 of file file.php.


Member Function Documentation

FileEngine::__active (  ) 

Determine is cache directory is writable

Returns:
boolean private

Definition at line 259 of file file.php.

References __(), CacheEngine::settings(), and writable().

Referenced by init().

FileEngine::__setKey ( key  ) 

Get absolute file for a given key

Parameters:
string $key The key
Returns:
mixed Absolute cache file for the given key or false if erroneous private

Definition at line 243 of file file.php.

References CacheEngine::settings().

Referenced by clear(), delete(), read(), and write().

FileEngine::clear ( check  ) 

Delete all values from the cache

Parameters:
boolean $check Optional - only delete expired cache items
Returns:
boolean True if the cache was succesfully cleared, false otherwise public

Reimplemented from CacheEngine.

Definition at line 204 of file file.php.

References __setKey(), read(), and CacheEngine::settings().

Referenced by gc().

FileEngine::delete ( 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 public

Reimplemented from CacheEngine.

Definition at line 191 of file file.php.

References __setKey().

FileEngine::gc (  ) 

Garbage collection. Permanently remove all expired and deleted data

Returns:
boolean True if garbage collection was succesful, false on failure public

Reimplemented from CacheEngine.

Definition at line 108 of file file.php.

References clear().

FileEngine::init ( 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 $setting array of setting for the engine
Returns:
boolean True if the engine has been successfully initialized, false if not public

Reimplemented from CacheEngine.

Definition at line 77 of file file.php.

References $settings, __active(), and CacheEngine::settings().

FileEngine::read ( 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 public

Reimplemented from CacheEngine.

Definition at line 159 of file file.php.

References __setKey(), and CacheEngine::settings().

Referenced by clear().

FileEngine::write ( key,
&$  data,
duration 
)

Write data for key into cache

Parameters:
string $key Identifier for the data
mixed $data Data to be cached
mixed $duration How long to cache the data, in seconds
Returns:
boolean True if the data was succesfully cached, false on failure public

Reimplemented from CacheEngine.

Definition at line 120 of file file.php.

References __setKey(), and CacheEngine::settings().


Member Data Documentation

FileEngine::$__active = false

Definition at line 59 of file file.php.

FileEngine::$__File = null

Definition at line 40 of file file.php.

FileEngine::$__init = true

Definition at line 66 of file file.php.

FileEngine::$settings = array()

Reimplemented from CacheEngine.

Definition at line 52 of file file.php.

Referenced by init().


The documentation for this class was generated from the following file:
Generated on Sun Nov 22 00:30:56 2009 for CakePHP 1.2.x.x (v1.2.4.8284) by doxygen 1.4.7