Class JCacheStorage

Description

Abstract cache storage handler

  • since: 11.1

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


	
			
Direct descendents
Class Description
 class JCacheStorageApc APC cache storage handler
 class JCacheStorageCachelite Cache lite storage handler
 class JCacheStorageFile File cache storage handler
 class JCacheStorageMemcache Memcache cache storage handler
 class JCacheStorageMemcached Memcached cache storage handler
 class JCacheStorageWincache WINCACHE cache storage handler
 class JCacheStorageXcache XCache cache storage handler
Variable Summary
 string $rawname
 string $_application
 string $_hash
 string $_language
 integer $_lifetime
 boolean $_locking
 datetime $_now
Method Summary
 static array addIncludePath ([string $path = ''])
 static JCacheStorage getInstance ([string $handler = null], [array $options = array()])
 static boolean isSupported ()
 static boolean test ()
 JCacheStorage __construct ([array $options = array()])
 boolean clean (string $group, [string $mode = null])
 boolean gc ()
 mixed get (string $id, string $group, [boolean $checkTime = true])
 mixed getAll ()
 boolean lock (string $id, string $group, integer $locktime)
 boolean remove (string $id, string $group)
 boolean store (string $id, string $group, string $data)
 boolean unlock (string $id, [string $group = null])
 string _getCacheId (string $id, string $group)
Variables
string $rawname (line 25)
  • var: Rawname
  • since: 11.1
  • access: protected
string $_application (line 55)
  • var: Application name.
  • since: 11.1
  • access: public
string $_hash (line 61)
  • var: Hash
  • since: 11.1
  • access: public
string $_language (line 49)
  • var: Language
  • since: 11.1
  • access: public
integer $_lifetime (line 37)
  • var: Cache lifetime
  • since: 11.1
  • access: public
boolean $_locking (line 43)
  • var: Locking
  • since: 11.1
  • access: public
datetime $_now (line 31)
  • var: Now
  • since: 11.1
  • access: public
Methods
static addIncludePath (line 329)

Add a directory where JCacheStorage 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 107)

Returns a cache storage handler object, only creating it if it doesn't already exist.

  • return: A JCacheStorage instance
  • since: 11.1
  • throws: UnexpectedValueException
  • throws: RuntimeException
  • access: public
static JCacheStorage getInstance ([string $handler = null], [array $options = array()])
  • string $handler: The cache storage handler to instantiate
  • array $options: Array of handler options
static isSupported (line 251)

Test to see if the storage handler is available.

  • return: True on success, false otherwise
  • since: 12.1.
  • access: public
static boolean isSupported ()

Redefined in descendants as:
static test (line 264)

Test to see if the storage handler is available.

  • return: True on success, false otherwise.
  • deprecated: 12.3 (Platform) & 4.0 (CMS)
  • since: 11.1
  • access: public
static boolean test ()
Constructor __construct (line 70)

Constructor

  • since: 11.1
  • access: public
JCacheStorage __construct ([array $options = array()])
  • array $options: Optional parameters

Redefined in descendants as:
clean (line 227)

Clean cache for a group given a mode.

  • return: True on success, false otherwise
  • since: 11.1
  • access: public
boolean clean (string $group, [string $mode = null])
  • string $group: The cache data group
  • string $mode: The mode for cleaning cache [group|notgroup] group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group

Redefined in descendants as:
gc (line 239)

Garbage collect expired cache data

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

Redefined in descendants as:
get (line 162)

Get cached data by id and group

  • return: Boolean false on failure or a cached data object
  • since: 11.1
  • access: public
mixed get (string $id, string $group, [boolean $checkTime = true])
  • string $id: The cache data id
  • string $group: The cache data group
  • boolean $checkTime: True to verify cache time expiration threshold

Redefined in descendants as:
getAll (line 175)

Get all cached data

  • return: Boolean false on failure or a cached data object
  • todo: Review this method. The docblock doesn't fit what it actually does.
  • since: 11.1
  • access: public
mixed getAll ()

Redefined in descendants as:
lock (line 282)

Lock cached item

  • return: True on success, false otherwise.
  • since: 11.1
  • access: public
boolean lock (string $id, string $group, integer $locktime)
  • string $id: The cache data id
  • string $group: The cache data group
  • integer $locktime: Cached item max lock time

Redefined in descendants as:
remove (line 210)

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)
  • string $id: The cache data id
  • string $group: The cache data group

Redefined in descendants as:
store (line 195)

Store the data to cache by id and group

  • return: True on success, false otherwise
  • since: 11.1
  • access: public
boolean store (string $id, string $group, string $data)
  • string $id: The cache data id
  • string $group: The cache data group
  • string $data: The data to store in cache

Redefined in descendants as:
unlock (line 297)

Unlock 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

Redefined in descendants as:
_getCacheId (line 312)

Get a cache_id string from an id/group pair

  • return: The cache_id string
  • since: 11.1
  • access: protected
string _getCacheId (string $id, string $group)
  • string $id: The cache data id
  • string $group: The cache data group

Documentation generated on Tue, 19 Nov 2013 15:14:22 +0100 by phpDocumentor 1.4.3