Add a directory where JCache should search for handlers. You may either pass a string or an array of directories.
static array
addIncludePath
([string $path = ''])
-
string
$path: A path to search.
Returns a reference to a cache adapter object, always creating it
static
JCache
getInstance
([
string $type =
'output'], [
array $options =
array()])
-
string
$type: The cache object type to instantiate
-
array
$options: The array of options
Get the storage handlers
static array
getStores
()
Perform workarounds on retrieved cached data
static string
getWorkarounds
(string $data, [array $options = array()])
-
string
$data: Cached data
-
array
$options: Array of options
Create safe id for cached data from url parameters set by plugins and framework
static string
makeId
()
Create workarounded data to be cached
static string
setWorkarounds
(string $data, [array $options = array()])
-
string
$data: Cached data
-
array
$options: Array of options
Constructor
JCache
__construct
(array $options)
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
boolean
clean
([string $group = null], [string $mode = 'group'])
-
string
$group: The cache data group
-
string
$mode: The mode for cleaning cache [group|notgroup]
Garbage collect expired cache data
boolean
gc
()
Get cached data by id and group
mixed
get
(string $id, [string $group = null])
-
string
$id: The cache data id
-
string
$group: The cache data group
Get a list of all cached data
mixed
getAll
()
Get caching state
boolean
getCaching
()
Set lock flag on cached item
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 a cached data entry by id and group
boolean
remove
(string $id, [string $group = null])
-
string
$id: The cache data id
-
string
$group: The cache data group
Set caching enabled state
void
setCaching
(boolean $enabled)
-
boolean
$enabled: True to enable caching
Set cache lifetime
void
setLifeTime
(integer $lt)
-
integer
$lt: Cache lifetime
Store the cached data by id and group
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
Unset lock flag on cached item
boolean
unlock
(string $id, [string $group = null])
-
string
$id: The cache data id
-
string
$group: The cache data group
Get the cache storage handler