API - XOOPS 2.5.11 Beta 2
By monxoops.fr
XoopsCacheEngine Class Reference
Inheritance diagram for XoopsCacheEngine:

Public Member Functions

 init ($settings=array())
 
 gc ()
 
 write ($key, $value, $duration=null)
 
 read ($key)
 
 delete ($key)
 
 clear ($check)
 
 settings ()
 

Data Fields

 $settings
 

Member Function Documentation

◆ clear()

clear (   $check)

Delete all keys from the cache

Parameters
boolean$checkif true will check expiration, otherwise delete all
Returns
boolean True if the cache was successfully cleared, false otherwise @access public

Reimplemented in XoopsCacheApc, XoopsCacheMemcache, XoopsCacheModel, and XoopsCacheFile.

◆ delete()

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 @access public

Reimplemented in XoopsCacheApc, XoopsCacheFile, XoopsCacheMemcache, and XoopsCacheModel.

◆ gc()

gc ( )

Garbage collection

Permanently remove all expired and deleted data

@access public

Reimplemented in XoopsCacheFile, and XoopsCacheModel.

◆ init()

init (   $settings = array())

Iitialize the cache engine

Called automatically by the cache frontend

Parameters
array$settingsAssociative array of parameters for the engine
Returns
boolean True if the engine has been successfully initialized, false if not @access public

Reimplemented in XoopsCacheApc, XoopsCacheFile, XoopsCacheMemcache, and XoopsCacheModel.

Here is the call graph for this function:

◆ read()

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 @access public

Reimplemented in XoopsCacheApc, XoopsCacheFile, XoopsCacheMemcache, and XoopsCacheModel.

◆ settings()

settings ( )

Cache Engine settings

Returns
array settings @access public
Here is the caller graph for this function:

◆ write()

write (   $key,
  $value,
  $duration = null 
)

Write value for a key into cache

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

Reimplemented in XoopsCacheFile, XoopsCacheApc, XoopsCacheMemcache, and XoopsCacheModel.

Field Documentation

◆ $settings


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