Back to Joomla project (class list)

Class CacheStorage - list of methods

Abstract cache storage handler

Direct known subclasses

Package: Joomla\CMS\Cache
Copyright: (C) 2007 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Cache/CacheStorage.php
Project: Joomla

Method Summary

public
(mixed $options = array())

Constructor
Parameters
  • array $options Optional parameters
Since
  • 1.7.0
Show source code of this method: __construct Source Code

public static \Joomla\CMS\Cache\CacheStorage
(mixed $handler = null, mixed $options = array())

Returns a cache storage handler object.
Parameters
  • string $handler The cache storage handler to instantiate
  • array $options Array of handler options
Returns
  • \Joomla\CMS\Cache\CacheStorage
Since
  • 1.7.0
-
  • \UnexpectedValueException
  • \Joomla\CMS\Cache\Exception\UnsupportedCacheException
Show source code of this method: getInstance Source Code

public bool
(mixed $id, mixed $group)

Check if the cache contains data stored by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • bool
Since
  • 3.7.0
Show source code of this method: contains Source Code

public mixed
(mixed $id, mixed $group, mixed $checkTime = true)

Get cached data by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
  • bool $checkTime True to verify cache time expiration threshold
Returns
  • mixed Boolean false on failure or a cached data object
Since
  • 1.7.0
Show source code of this method: get Source Code

public mixed
()

Get all cached data
Returns
  • mixed Boolean false on failure or a cached data object
Since
  • 1.7.0
Show source code of this method: getAll Source Code

public bool
(mixed $id, mixed $group, mixed $data)

Store the data to cache by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
  • string $data The data to store in cache
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: store Source Code

public bool
(mixed $id, mixed $group)

Remove a cached data entry by ID and group
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: remove Source Code

public bool
(mixed $group, mixed $mode = null)

Clean cache for a group given a mode.
Parameters
  • string $group The cache data group
  • string $mode The mode for cleaning cache [group|notgroup]
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: clean Source Code

public bool
()

Flush all existing items in storage.
Returns
  • bool
Since
  • 3.6.3
Show source code of this method: flush Source Code

public bool
()

Garbage collect expired cache data
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: gc Source Code

public static bool
()

Test to see if the storage handler is available.
Returns
  • bool
Since
  • 3.0.0
Show source code of this method: isSupported Source Code

public mixed
(mixed $id, mixed $group, mixed $locktime)

Lock cached item
Parameters
  • string $id The cache data ID
  • string $group The cache data group
  • int $locktime Cached item max lock time
Returns
  • mixed Boolean false if locking failed or an object containing properties lock and locklooped
Since
  • 1.7.0
Show source code of this method: lock Source Code

public bool
(mixed $id, mixed $group = null)

Unlock cached item
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: unlock Source Code

protected string
(mixed $id, mixed $group)

Get a cache ID string from an ID/group pair
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • string
Since
  • 1.7.0
Show source code of this method: _getCacheId Source Code

public static array
(mixed $path = '')

Add a directory where CacheStorage should search for handlers. You may either pass a string or an array of directories.
Parameters
  • array|string $path A path to search.
Returns
  • array An array with directory elements
Since
  • 1.7.0
Show source code of this method: addIncludePath Source Code

Properties Summary

protected string
$rawname
The raw object name
Since
  • 1.7.0
public int
$_now
Time that the cache storage handler was instantiated
Since
  • 1.7.0
public int
$_lifetime
Cache lifetime
Since
  • 1.7.0
public bool
$_locking
Flag if locking is enabled
Since
  • 1.7.0
public string
$_language
Language code
Since
  • 1.7.0
public string
$_application
Application name
Since
  • 1.7.0
public string
$_hash
Object hash
Since
  • 1.7.0

Tags Summary

Since
1.7.0