LFSWorldFileCache Class Reference

List of all members.

Public Member Functions

 LFSWorldFileCache (&$cache, $params=array())
 get ($params)
 save ($data, $params)
 createKey ($uniqData)
 requiresDataReload ()

Protected Member Functions

 _getLastUpdate ()

Protected Attributes

 $m_oCache = null
 $m_nLastUpdate = 0
 $m_aDefaults

Detailed Description

Provides an interface bridge between LFSWorld and Cache_lite.

Version:
1.2.00

Definition at line 22 of file lfsworldfilecache.php.


Constructor & Destructor Documentation

LFSWorldFileCache::LFSWorldFileCache &$  cache,
params = array()
 

LFSWorldFileCache Ctor.

Parameters:
cache (&Object) A reference to a Cache_lite object, or at least an object with a compatible interface.
params (Array) An array of options to configure the cache.
Returns:
(Void)

Definition at line 51 of file lfsworldfilecache.php.


Member Function Documentation

LFSWorldFileCache::_getLastUpdate  )  [protected]
 

Returns the last update timestamp of the last cache fetched.

Returns:
(Integer) 0 if the update time could not be retrieved, unix timestamp of last update otherwise.

Definition at line 121 of file lfsworldfilecache.php.

Referenced by get().

LFSWorldFileCache::createKey uniqData  ) 
 

Creates a unique key for the data provided.

Parameters:
uniqData (String) A unique string to create a further unique identifier.
Returns:
(String) A unique identifier for the data given.

Definition at line 110 of file lfsworldfilecache.php.

LFSWorldFileCache::get params  ) 
 

Retrieve data from the cache.

Parameters:
params (Array) An array of params to be used in querying the cache. (Cache group, entry key etc)
Returns:
(Array) An array including meta data, and retrieved data on success, false on failure.

Definition at line 64 of file lfsworldfilecache.php.

References _getLastUpdate(), and array_merge_replace().

LFSWorldFileCache::requiresDataReload  ) 
 

Returns a boolean indicating whether LFSWorldFileCache::get should be called immediately after a save.

Returns:
(Boolean) False because the file cache does not require this behaviour.

Definition at line 133 of file lfsworldfilecache.php.

LFSWorldFileCache::save data,
params
 

Save data to the cache.

Parameters:
data (Mixed) The data to cache.
params (Array) An array of params to be used in saving the data. (Cache group, entry key etc)
Returns:
(Void)

Definition at line 89 of file lfsworldfilecache.php.

References array_merge_replace().


Member Data Documentation

LFSWorldFileCache::$m_aDefaults [protected]
 

Initial value:

 array(  'group' => 'default',
                                'noValidityCheck' => false)
(Array) An array of options to use as default configuration values.

Definition at line 40 of file lfsworldfilecache.php.

LFSWorldFileCache::$m_nLastUpdate = 0 [protected]
 

(Integer) Last update time of the cache file as a UNIX timestamp.

Definition at line 34 of file lfsworldfilecache.php.

LFSWorldFileCache::$m_oCache = null [protected]
 

(Object) An instance of a Cache_lite object, or at least an object with a compatibile interface.

Definition at line 28 of file lfsworldfilecache.php.


Generated on Wed Oct 25 03:13:33 2006 for LFSWorldParsingProviderFramework by  doxygen 1.4.6