[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Cache/ -> Cache.php (summary)

Joomla! Content Management System

Copyright: (C) 2005 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 820 lines (18 kb)
Included or required:0 times
Referenced: 2 times
Includes or requires: 0 files

Defines 1 class

Cache:: (21 methods):
  __construct()
  getInstance()
  getStores()
  setCaching()
  getCaching()
  setLifeTime()
  contains()
  get()
  getAll()
  store()
  remove()
  clean()
  gc()
  lock()
  unlock()
  _getStorage()
  getWorkarounds()
  setWorkarounds()
  makeId()
  getPlatformPrefix()
  addIncludePath()


Class: Cache  - X-Ref

Joomla! Cache base object

__construct($options)   X-Ref
Constructor

param: array  $options  Cache options

getInstance($type = 'output', $options = array()   X-Ref
Returns a reference to a cache adapter object, always creating it

param: string  $type     The cache object type to instantiate
param: array   $options  The array of options
return: CacheController

getStores()   X-Ref
Get the storage handlers

return: array

setCaching($enabled)   X-Ref
Set caching enabled state

param: boolean  $enabled  True to enable caching
return: void

getCaching()   X-Ref
Get caching state

return: boolean

setLifeTime($lt)   X-Ref
Set cache lifetime

param: integer  $lt  Cache lifetime
return: void

contains($id, $group = null)   X-Ref
Check if the cache contains data stored by ID and group

param: string  $id     The cache data ID
param: string  $group  The cache data group
return: boolean

get($id, $group = null)   X-Ref
Get cached data by ID and group

param: string  $id     The cache data ID
param: string  $group  The cache data group
return: mixed  Boolean false on failure or a cached data object

getAll()   X-Ref
Get a list of all cached data

return: mixed  Boolean false on failure or an object with a list of cache groups and data

store($data, $id, $group = null)   X-Ref
Store the cached data by ID and group

param: mixed   $data   The data to store
param: string  $id     The cache data ID
param: string  $group  The cache data group
return: boolean

remove($id, $group = null)   X-Ref
Remove a cached data entry by ID and group

param: string  $id     The cache data ID
param: string  $group  The cache data group
return: boolean

clean($group = null, $mode = 'group')   X-Ref
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

param: string  $group  The cache data group
param: string  $mode   The mode for cleaning cache [group|notgroup]
return: boolean  True on success, false otherwise

gc()   X-Ref
Garbage collect expired cache data

return: boolean

lock($id, $group = null, $locktime = null)   X-Ref
Set lock flag on cached item

param: string  $id        The cache data ID
param: string  $group     The cache data group
param: string  $locktime  The default locktime for locking the cache.
return: \stdClass  Object with properties of lock and locklooped

unlock($id, $group = null)   X-Ref
Unset lock flag on cached item

param: string  $id     The cache data ID
param: string  $group  The cache data group
return: boolean

_getStorage()   X-Ref
Get the cache storage handler

return: CacheStorage

getWorkarounds($data, $options = array()   X-Ref
Perform workarounds on retrieved cached data

param: array   $data     Cached data
param: array   $options  Array of options
return: string  Body of cached data

setWorkarounds($data, $options = [])   X-Ref
Create workarounds for data to be cached

param: string  $data     Cached data
param: array   $options  Array of options
return: array  Data to be cached

makeId()   X-Ref
Create a safe ID for cached data from URL parameters

return: string  MD5 encoded cache ID

getPlatformPrefix()   X-Ref
Set a prefix cache key if device calls for separate caching

return: string

addIncludePath($path = '')   X-Ref
Add a directory where Cache should search for handlers. You may either pass a string or an array of directories.

param: array|string  $path  A path to search.
return: array   An array with directory elements



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer