|
| _checkExpire ($id, $group) |
|
| _getFilePath ($id, $group) |
|
| _deleteFolder ($path) |
|
| _cleanPath ($path, $ds=DIRECTORY_SEPARATOR) |
|
| _filesInFolder ($path, $filter= '.', $recurse=false, $fullpath=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*', '.*~')) |
|
| _folders ($path, $filter= '.', $recurse=false, $fullpath=false, $exclude=array('.svn', 'CVS', '.DS_Store', '__MACOSX'), $excludefilter=array('^\..*')) |
|
JCacheStorageVmfile::__construct |
( |
|
$options = array() | ) |
|
Constructor
- Parameters
-
array | $options | Optional parameters |
- Since
- 11.1
JCacheStorageVmfile::_checkExpire |
( |
|
$id, |
|
|
|
$group |
|
) |
| |
|
protected |
Check to make sure cache is still valid, if not, delete it.
- Parameters
-
string | $id | Cache key to expire. |
string | $group | The cache data group. |
- Returns
- boolean False if not valid
- Since
- 11.1
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
- 11.1
JCacheStorageVmfile::_deleteFolder |
( |
|
$path | ) |
|
|
protected |
Quickly delete a folder of files
- Parameters
-
string | $path | The path to the folder to delete. |
- Returns
- boolean True on success.
- Since
- 11.1
JCacheStorageVmfile::_filesInFolder |
( |
|
$path, |
|
|
|
$filter = '.' , |
|
|
|
$recurse = false , |
|
|
|
$fullpath = false , |
|
|
|
$exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX') , |
|
|
|
$excludefilter = array('^\..*', '.*~') |
|
) |
| |
|
protected |
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. |
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 |
- Returns
- array Files in the given folder.
- Since
- 11.1
JCacheStorageVmfile::_folders |
( |
|
$path, |
|
|
|
$filter = '.' , |
|
|
|
$recurse = false , |
|
|
|
$fullpath = false , |
|
|
|
$exclude = array('.svn', 'CVS', '.DS_Store', '__MACOSX') , |
|
|
|
$excludefilter = array('^\..*') |
|
) |
| |
|
protected |
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. |
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. |
- Returns
- array Folders in the given folder.
- Since
- 11.1
JCacheStorageVmfile::_getFilePath |
( |
|
$id, |
|
|
|
$group |
|
) |
| |
|
protected |
Get a cache file path from an id/group pair
- Parameters
-
string | $id | The cache data id |
string | $group | The cache data group |
- Returns
- string The cache file path
- Since
- 11.1
JCacheStorageVmfile::clean |
( |
|
$group, |
|
|
|
$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] group mode : cleans all cache in the group notgroup mode : cleans all cache not in the group |
- Returns
- boolean True on success, false otherwise
- Since
- 11.1
JCacheStorageVmfile::gc |
( |
| ) |
|
Garbage collect expired cache data
- Returns
- boolean True on success, false otherwise.
- Since
- 11.1
JCacheStorageVmfile::get |
( |
|
$id, |
|
|
|
$group, |
|
|
|
$checkTime = true |
|
) |
| |
Get cached data from a file by id and group
- Parameters
-
string | $id | The cache data id |
string | $group | The cache data group |
boolean | $checkTime | True to verify cache time expiration threshold |
- Returns
- mixed Boolean false on failure or a cached data string
- Since
- 11.1
JCacheStorageVmfile::getAll |
( |
| ) |
|
Get all cached data
- Returns
- array The cached data
- Since
- 11.1
JCacheStorageVmfile::lock |
( |
|
$id, |
|
|
|
$group, |
|
|
|
$locktime |
|
) |
| |
Lock cached item
- Parameters
-
string | $id | The cache data id |
string | $group | The cache data group |
integer | $locktime | Cached item max lock time |
- Returns
- boolean True on success, false otherwise.
- Since
- 11.1
JCacheStorageVmfile::remove |
( |
|
$id, |
|
|
|
$group |
|
) |
| |
Remove a cached data file by id and group
- Parameters
-
string | $id | The cache data id |
string | $group | The cache data group |
- Returns
- boolean True on success, false otherwise
- Since
- 11.1
JCacheStorageVmfile::store |
( |
|
$id, |
|
|
|
$group, |
|
|
|
$data |
|
) |
| |
Store the data to a file 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
- boolean True on success, false otherwise
- Since
- 11.1
static JCacheStorageVmfile::test |
( |
| ) |
|
|
static |
Test to see if the cache storage is available.
- Returns
- boolean True on success, false otherwise.
- Since
- 11.1
JCacheStorageVmfile::unlock |
( |
|
$id, |
|
|
|
$group = null |
|
) |
| |
Unlock cached item
- Parameters
-
string | $id | The cache data id |
string | $group | The cache data group |
- Returns
- boolean True on success, false otherwise.
- Since
- 11.1
JCacheStorageVmfile::$_root |
|
protected |
The documentation for this class was generated from the following file: