ModelEngine Class Reference

Inheritance diagram for ModelEngine:

CacheEngine Object

List of all members.


Public Member Functions

 clear ()
 delete ($key)
 gc ()
 init ($settings)
 read ($key)
 write ($key, &$data, $duration)

Public Attributes

 $settings = array()

Detailed Description

Definition at line 34 of file model.php.


Member Function Documentation

ModelEngine::clear (  ) 

Delete all keys from the cache

Returns:
boolean True if the cache was succesfully cleared, false otherwise public

Definition at line 151 of file model.php.

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

Reimplemented from CacheEngine.

Definition at line 142 of file model.php.

ModelEngine::gc (  ) 

Garbage collection. Permanently remove all expired and deleted data

public

Reimplemented from CacheEngine.

Definition at line 87 of file model.php.

ModelEngine::init ( settings  ) 

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 69 of file model.php.

References $settings, App::import(), ClassRegistry::init(), and CacheEngine::settings().

ModelEngine::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 125 of file model.php.

References CacheEngine::settings().

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

Write data for key into cache

Parameters:
string $key Identifier for the data
mixed $data 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 public

Reimplemented from CacheEngine.

Definition at line 99 of file model.php.

References CacheEngine::settings().


Member Data Documentation

ModelEngine::$settings = array()

Reimplemented from CacheEngine.

Definition at line 43 of file model.php.

Referenced by init().


The documentation for this class was generated from the following file: