Back to Joomla project (class list)

Class FileStorage - list of methods

File cache storage handler

Extends

Package: Joomla\CMS\Cache\Storage
Copyright: (C) 2007 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Cache/Storage/FileStorage.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 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
()

Garbage collect expired cache data
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: gc 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 bool
(mixed $id, mixed $group)

Check if a cache object has expired
Parameters
  • string $id Cache ID to check
  • string $group The cache data group
Returns
  • bool True if the cache ID is valid
Since
  • 1.7.0
Show source code of this method: _checkExpire Source Code

protected bool|string
(mixed $id, mixed $group)

Get a cache file path from an ID/group pair
Parameters
  • string $id The cache data ID
  • string $group The cache data group
Returns
  • bool|string The path to the data object or boolean false if the cache directory does not exist
Since
  • 1.7.0
Show source code of this method: _getFilePath Source Code

protected bool
(mixed $path)

Quickly delete a folder of files
Parameters
  • string $path The path to the folder to delete.
Returns
  • bool
Since
  • 1.7.0
Show source code of this method: _deleteFolder Source Code

protected string
(mixed $path, mixed $ds = DIRECTORY_SEPARATOR)

Function to strip additional / or \ in a path name
Parameters
  • string $path The path to clean
  • string $ds Directory separator (optional)
Returns
  • string The cleaned path
Since
  • 1.7.0
Show source code of this method: _cleanPath Source Code

protected array
(mixed $path, mixed $filter = '.', mixed $recurse = false, mixed $fullpath = false, mixed $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), mixed $excludefilter = array('^\\..*', '.*~'))

Utility function to quickly read the files in a folder.
Parameters
  • 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.
  • bool $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
Returns
  • array Files in the given folder.
Since
  • 1.7.0
Show source code of this method: _filesInFolder Source Code

protected array
(mixed $path, mixed $filter = '.', mixed $recurse = false, mixed $fullpath = false, mixed $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), mixed $excludefilter = array('^\\..*'))

Utility function to read the folders in a folder.
Parameters
  • 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.
  • bool $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.
Returns
  • array Folders in the given folder.
Since
  • 1.7.0
Show source code of this method: _folders Source Code

Properties Summary

protected string
$_root
Root path
Since
  • 1.7.0
protected array
$_locked_files
Locked resources
Since
  • 3.7.0

Tags Summary

Since
1.7.0