public
|
#
__construct( array $options = array() )
Constructor
Parameters
- $options
array - $options Optional parameters
Since
11.1
Overrides
|
public
boolean
|
#
contains( string $id, string $group )
Check if the cache contains data stored by ID and group
Check if the cache contains data stored by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
3.7.0
Overrides
|
public
mixed
|
#
get( string $id, string $group, boolean $checkTime = true )
Get cached data by ID and group
Get cached data by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $checkTime
boolean - $checkTime True to verify cache time expiration threshold
Returns
mixed - Boolean false on failure or a cached data object
Since
11.1
Overrides
|
public
mixed
|
#
getAll( )
Get all cached data
Returns
mixed - Boolean false on failure or a cached data object
Since
11.1
Overrides
|
public
boolean
|
#
store( string $id, string $group, string $data )
Store the data to cache by ID and group
Store the data to cache by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $data
string - $data The data to store in cache
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
remove( string $id, string $group )
Remove a cached data entry by ID and group
Remove a cached data entry by ID and group
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
clean( string $group, string $mode = null )
Clean cache for a group given a mode.
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
Parameters
- $group
string - $group The cache data group
- $mode
string - $mode The mode for cleaning cache [group|notgroup]
Returns
boolean
Since
11.1
Overrides
|
public
boolean
|
#
gc( )
Garbage collect expired cache data
Garbage collect expired cache data
Returns
boolean
Since
11.1
Overrides
|
public static
boolean
|
#
isSupported( )
Test to see if the storage handler is available.
Test to see if the storage handler is available.
Returns
boolean
Since
12.1
Overrides
|
public
mixed
|
#
lock( string $id, string $group, integer $locktime )
Lock cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
- $locktime
integer - $locktime Cached item max lock time
Returns
mixed - Boolean false if locking failed or an object containing properties lock and
locklooped
Since
11.1
Overrides
|
public
boolean
|
#
unlock( string $id, string $group = null )
Unlock cached item
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean
Since
11.1
Overrides
|
protected
boolean
|
#
_checkExpire( string $id, string $group )
Check if a cache object has expired
Check if a cache object has expired
Using @ error suppressor here because between if we did a file_exists() and
then filemsize() there will be a little time space when another process can
delete the file and then you get PHP Warning
Parameters
- $id
string - $id Cache ID to check
- $group
string - $group The cache data group
Returns
boolean - True if the cache ID is valid
Since
11.1
|
protected
boolean|string
|
#
_getFilePath( string $id, string $group )
Get a cache file path from an ID/group pair
Get a cache file path from an ID/group pair
Parameters
- $id
string - $id The cache data ID
- $group
string - $group The cache data group
Returns
boolean|string - The path to the data object or boolean false if the cache directory does not
exist
Since
11.1
|
protected
boolean
|
#
_deleteFolder( string $path )
Quickly delete a folder of files
Quickly delete a folder of files
Parameters
- $path
string - $path The path to the folder to delete.
Returns
boolean
Since
11.1
|
protected
string
|
#
_cleanPath( string $path, string $ds = DIRECTORY_SEPARATOR )
Function to strip additional / or \ in a path name
Function to strip additional / or \ in a path name
Parameters
- $path
string - $path The path to clean
- $ds
string - $ds Directory separator (optional)
Returns
string - The cleaned path
Since
11.1
|
protected
array
|
#
_filesInFolder( string $path, string $filter = '.', mixed $recurse = false, boolean $fullpath = false, array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array $excludefilter = array('^\..*', '.*~') )
Utility function to quickly read the files in a folder.
Utility function to quickly read the files in a folder.
Parameters
- $path
string - $path The path of the folder to read.
- $filter
string - $filter A filter for file names.
- $recurse
mixed - $recurse True to recursively search into sub-folders, or an integer to specify
the maximum depth.
- $fullpath
boolean - $fullpath True to return the full path to the file.
- $exclude
array - $exclude Array with names of files which should not be shown in the result.
- $excludefilter
array - $excludefilter Array of folder names to exclude
Returns
array - Files in the given folder.
Since
11.1
|
protected
array
|
#
_folders( string $path, string $filter = '.', mixed $recurse = false, boolean $fullpath = false, array $exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX'), array $excludefilter = array('^\..*') )
Utility function to read the folders in a folder.
Utility function to read the folders in a folder.
Parameters
- $path
string - $path The path of the folder to read.
- $filter
string - $filter A filter for folder names.
- $recurse
mixed - $recurse True to recursively search into sub-folders, or an integer to specify
the maximum depth.
- $fullpath
boolean - $fullpath True to return the full path to the folders.
- $exclude
array - $exclude Array with names of folders which should not be shown in the result.
- $excludefilter
array - $excludefilter Array with regular expressions matching folders which should not
be shown in the result.
Returns
array - Folders in the given folder.
Since
11.1
|