Class JCacheStorageFile

Description

File cache storage handler

  • since: 11.1

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

JCacheStorage
   |
   --JCacheStorageFile
Variable Summary
 string $_root
Method Summary
 static boolean isSupported ()
 JCacheStorageFile __construct ([array $options = array()])
 boolean clean (string $group, [string $mode = null])
 boolean gc ()
 mixed get (string $id, string $group, [boolean $checkTime = true])
 array 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])
 boolean _checkExpire (string $id, string $group)
 string _cleanPath (string $path, [string $ds = DIRECTORY_SEPARATOR])
 boolean _deleteFolder (string $path)
 array _filesInFolder (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX')], [array $excludefilter = array('^\..*', '.*~')])
 array _folders (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX')], [array $excludefilter = array('^\..*')])
 string _getFilePath (string $id, string $group)
Variables
Methods
static isSupported (line 247)

Test to see if the cache storage is available.

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

Redefinition of:
JCacheStorage::isSupported()
Test to see if the storage handler is available.
Constructor __construct (line 36)

Constructor

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

Redefinition of:
JCacheStorage::__construct()
Constructor
clean (line 183)

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

Redefinition of:
JCacheStorage::clean()
Clean cache for a group given a mode.
gc (line 223)

Garbage collect expired cache data

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

Redefinition of:
JCacheStorage::gc()
Garbage collect expired cache data
get (line 55)

Get cached data from a file 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, [boolean $checkTime = true])
  • string $id: The cache data id
  • string $group: The cache data group
  • boolean $checkTime: True to verify cache time expiration threshold

Redefinition of:
JCacheStorage::get()
Get cached data by id and group
getAll (line 88)

Get all cached data

  • return: The cached data
  • since: 11.1
  • access: public
array getAll ()

Redefinition of:
JCacheStorage::getAll()
Get all cached data
lock (line 264)

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

Redefinition of:
JCacheStorage::lock()
Lock cached item
remove (line 161)

Remove a cached data file 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

Redefinition of:
JCacheStorage::remove()
Remove a cached data entry by id and group
store (line 122)

Store the data to a file 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

Redefinition of:
JCacheStorage::store()
Store the data to cache by id and group
unlock (line 321)

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

Redefinition of:
JCacheStorage::unlock()
Unlock cached item
_checkExpire (line 346)

Check to make sure cache is still valid, if not, delete it.

  • return: False if not valid
  • since: 11.1
  • access: protected
boolean _checkExpire (string $id, string $group)
  • string $id: Cache key to expire.
  • string $group: The cache data group.
_cleanPath (line 501)

Function to strip additional / or \ in a path name

  • return: The cleaned path
  • since: 11.1
  • access: protected
string _cleanPath (string $path, [string $ds = DIRECTORY_SEPARATOR])
  • string $path: The path to clean
  • string $ds: Directory separator (optional)
_deleteFolder (line 405)

Quickly delete a folder of files

  • return: True on success.
  • since: 11.1
  • access: protected
boolean _deleteFolder (string $path)
  • string $path: The path to the folder to delete.
_filesInFolder (line 534)

Utility function to quickly read the files in a folder.

  • return: Files in the given folder.
  • since: 11.1
  • access: protected
array _filesInFolder (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX')], [array $excludefilter = array('^\..*', '.*~')])
  • string $path: The path of the folder to read.
  • string $filter: A filter for file names.
  • mixed $recurse: True to recursively search into sub-folders, or an integer to specify the maximum depth.
  • boolean $fullpath: True to return the full path to the file.
  • array $exclude: Array with names of files which should not be shown in the result.
  • array $excludefilter: Array of folder names to exclude
_folders (line 620)

Utility function to read the folders in a folder.

  • return: Folders in the given folder.
  • since: 11.1
  • access: protected
array _folders (string $path, [string $filter = '.'], [mixed $recurse = false], [boolean $fullpath = false], [array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX')], [array $excludefilter = array('^\..*')])
  • string $path: The path of the folder to read.
  • string $filter: A filter for folder names.
  • mixed $recurse: True to recursively search into sub-folders, or an integer to specify the maximum depth.
  • boolean $fullpath: True to return the full path to the folders.
  • array $exclude: Array with names of folders which should not be shown in the result.
  • array $excludefilter: Array with regular expressions matching folders which should not be shown in the result.
_getFilePath (line 374)

Get a cache file path from an id/group pair

  • return: The cache file path
  • since: 11.1
  • access: protected
string _getFilePath (string $id, string $group)
  • string $id: The cache data id
  • string $group: The cache data group

Inherited Methods

Inherited From JCacheStorage

 JCacheStorage::__construct()
 JCacheStorage::addIncludePath()
 JCacheStorage::clean()
 JCacheStorage::gc()
 JCacheStorage::get()
 JCacheStorage::getAll()
 JCacheStorage::getInstance()
 JCacheStorage::isSupported()
 JCacheStorage::lock()
 JCacheStorage::remove()
 JCacheStorage::store()
 JCacheStorage::test()
 JCacheStorage::unlock()
 JCacheStorage::_getCacheId()

Documentation generated on Tue, 19 Nov 2013 15:03:10 +0100 by phpDocumentor 1.4.3