XOOPS 2.5.6  Final
 All Classes Namespaces Files Functions Variables Pages
XoopsCacheFile Class Reference
Inheritance diagram for XoopsCacheFile:
Inheritance graph

Public Member Functions

 active ()
 
 clear ($check=true)
 
 delete ($key)
 
 gc ()
 
 init ($settings=array())
 
 read ($key)
 
 setKey ($key)
 
 write ($key, $data=null, $duration=null)
 
- Public Member Functions inherited from XoopsCacheEngine
 clear ($check)
 
 delete ($key)
 
 gc ()
 
 init ($settings=array())
 
 read ($key)
 
 settings ()
 
 write ($key, $value=null, $duration=null)
 

Public Attributes

 $active = false
 
 $file = null
 
 $init = true
 
 $settings = array()
 
- Public Attributes inherited from XoopsCacheEngine
 $settings
 

Detailed Description

Definition at line 55 of file file.php.

Member Function Documentation

XoopsCacheFile::active ( )

Determine is cache directory is writable

Returns
boolean private

Definition at line 298 of file file.php.

XoopsCacheFile::clear (   $check = true)

Delete all values from the cache

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

Definition at line 241 of file file.php.

References $dir, and $expires.

XoopsCacheFile::delete (   $key)

Delete a key from the cache

Parameters
string$keyIdentifier for the data
Returns
boolean True if the value was successfully deleted, false if it didn't exist or couldn't be removed public

Definition at line 226 of file file.php.

XoopsCacheFile::gc ( )

Garbage collection. Permanently remove all expired and deleted data

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

Definition at line 126 of file file.php.

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

Definition at line 104 of file file.php.

References XoopsFile\getHandler(), and XoopsLoad\load().

Here is the call graph for this function:

XoopsCacheFile::read (   $key)

Read a key from the cache

Parameters
string$keyIdentifier 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

Definition at line 187 of file file.php.

References XoopsLoad\load(), and XoopsUtility\recursive().

Here is the call graph for this function:

XoopsCacheFile::setKey (   $key)

Get absolute file for a given key

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

Definition at line 282 of file file.php.

XoopsCacheFile::write (   $key,
  $data = null,
  $duration = null 
)

Write data for key into cache

Parameters
string$keyIdentifier for the data
mixed$dataData to be cached
mixed$durationHow long to cache the data, in seconds
Returns
boolean True if the data was succesfully cached, false on failure public

Definition at line 140 of file file.php.

References $expires.

Member Data Documentation

XoopsCacheFile::$active = false

Definition at line 84 of file file.php.

XoopsCacheFile::$file = null

Definition at line 63 of file file.php.

XoopsCacheFile::$init = true

Definition at line 92 of file file.php.

XoopsCacheFile::$settings = array()

Definition at line 76 of file file.php.


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