Class JCache

Description

Joomla! Cache base object

  • since: 11.1

Located in /libraries/joomla/cache/cache.php (line 19)


	
			
Variable Summary
 static object Storage $_handler
 array $_options
Method Summary
 static array addIncludePath ([string $path = ''])
 static JCache getInstance ([string $type = 'output'], [array $options = array()])
 static array getStores ()
 static string getWorkarounds (string $data, [array $options = array()])
 static string makeId ()
 static string setWorkarounds (string $data, [array $options = array()])
 JCache __construct (array $options)
 boolean clean ([string $group = null], [string $mode = 'group'])
 boolean gc ()
 mixed get (string $id, [string $group = null])
 mixed getAll ()
 boolean getCaching ()
 object Properties lock (string $id, [string $group = null], [string $locktime = null])
 boolean remove (string $id, [string $group = null])
 void setCaching (boolean $enabled)
 void setLifeTime (integer $lt)
 boolean store (mixed $data, string $id, [string $group = null])
 boolean unlock (string $id, [string $group = null])
Variables
static object Storage $_handler = array() (line 25)
  • var: handler
  • since: 11.1
  • access: public
array $_options (line 31)
  • var: Options
  • since: 11.1
  • access: public
Methods
static addIncludePath (line 711)

Add a directory where JCache should search for handlers. You may either pass a string or an array of directories.

  • return: An array with directory elements
  • since: 11.1
  • access: public
static array addIncludePath ([string $path = ''])
  • string $path: A path to search.
static getInstance (line 80)

Returns a reference to a cache adapter object, always creating it

  • return: A JCache object
  • since: 11.1
  • access: public
static JCache getInstance ([string $type = 'output'], [array $options = array()])
  • string $type: The cache object type to instantiate
  • array $options: The array of options
static getStores (line 92)

Get the storage handlers

  • return: An array of available storage handlers
  • since: 11.1
  • access: public
static array getStores ()
static getWorkarounds (line 463)

Perform workarounds on retrieved cached data

  • return: Body of cached data
  • since: 11.1
  • access: public
static string getWorkarounds (string $data, [array $options = array()])
  • string $data: Cached data
  • array $options: Array of options
static makeId (line 673)

Create safe id for cached data from url parameters set by plugins and framework

  • return: md5 encoded cacheid
  • since: 11.1
  • access: public
static string makeId ()
static setWorkarounds (line 533)

Create workarounded data to be cached

  • return: Data to be cached
  • since: 11.1
  • access: public
static string setWorkarounds (string $data, [array $options = array()])
  • string $data: Cached data
  • array $options: Array of options
Constructor __construct (line 40)

Constructor

  • since: 11.1
  • access: public
JCache __construct (array $options)
  • array $options: options
clean (line 277)

Clean cache for a group given a mode.

group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group

  • return: True on success, false otherwise
  • since: 11.1
  • access: public
boolean clean ([string $group = null], [string $mode = 'group'])
  • string $group: The cache data group
  • string $mode: The mode for cleaning cache [group|notgroup]
gc (line 298)

Garbage collect expired cache data

  • return: True on success, false otherwise.
  • since: 11.1
  • access: public
boolean gc ()
get (line 182)

Get cached data by id and group

  • return: boolean False on failure or a cached data string
  • since: 11.1
  • access: public
mixed get (string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group
getAll (line 203)

Get a list of all cached data

  • return: Boolean false on failure or an object with a list of cache groups and data
  • since: 11.1
  • access: public
mixed getAll ()
getCaching (line 153)

Get caching state

  • return: Caching state
  • since: 11.1
  • access: public
boolean getCaching ()
lock (line 320)

Set lock flag on cached item

  • return: are lock and locklooped
  • since: 11.1
  • access: public
object Properties lock (string $id, [string $group = null], [string $locktime = null])
  • string $id: The cache data id
  • string $group: The cache data group
  • string $locktime: The default locktime for locking the cache.
remove (line 250)

Remove a cached data entry by id and group

  • return: True on success, false otherwise
  • since: 11.1
  • access: public
boolean remove (string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group
setCaching (line 141)

Set caching enabled state

  • since: 11.1
  • access: public
void setCaching (boolean $enabled)
  • boolean $enabled: True to enable caching
setLifeTime (line 167)

Set cache lifetime

  • since: 11.1
  • access: public
void setLifeTime (integer $lt)
  • integer $lt: Cache lifetime
store (line 225)

Store the cached data by id and group

  • return: True if cache stored
  • since: 11.1
  • access: public
boolean store (mixed $data, string $id, [string $group = null])
  • mixed $data: The data to store
  • string $id: The cache data id
  • string $group: The cache data group
unlock (line 406)

Unset lock flag on cached item

  • return: True on success, false otherwise.
  • since: 11.1
  • access: public
boolean unlock (string $id, [string $group = null])
  • string $id: The cache data id
  • string $group: The cache data group
_getStorage (line 440)

Get the cache storage handler

  • return: A JCacheStorage object
  • since: 11.1
  • access: public
JCacheStorage &_getStorage ()

Documentation generated on Tue, 19 Nov 2013 14:54:52 +0100 by phpDocumentor 1.4.3