Elgg
Version 2.3
|
Public Member Functions | |
__construct ($cache_path, $max_age=0, $max_size=0) | |
Set the Elgg cache. More... | |
save ($key, $data) | |
Save a key. More... | |
load ($key, $offset=0, $limit=null) | |
Load a key. More... | |
delete ($key) | |
Invalidate a given key. More... | |
clear () | |
Delete all files in the directory of this file cache. More... | |
__destruct () | |
Preform cleanup and invalidates cache upon object destruction. More... | |
![]() | |
__construct () | |
Set the constructor. More... | |
setVariable ($variable, $value) | |
Set a cache variable. More... | |
getVariable ($variable) | |
Get variables for this cache. More... | |
__get ($key) | |
Class member get overloading, returning key using $this->load defaults. More... | |
__set ($key, $value) | |
Class member set overloading, setting a key using $this->save defaults. More... | |
__isset ($key) | |
Supporting isset, using $this->load() with default values. More... | |
__unset ($key) | |
Supporting unsetting of magic attributes. More... | |
add ($key, $data) | |
Add a key only if it doesn't already exist. More... | |
offsetSet ($key, $value) | |
Assigns a value for the specified key. More... | |
offsetGet ($key) | |
Get the value for specified key. More... | |
offsetUnset ($key) | |
Unsets a key. More... | |
offsetExists ($key) | |
Does key exist. More... | |
Protected Member Functions | |
createFile ($filename, $rw="rb") | |
Create and return a handle to a file. More... | |
sanitise_filename ($key) | |
Create a sanitised filename for the file. More... | |
sanitizeFilename ($key) | |
Create a sanitised filename for the file. More... | |
Definition at line 9 of file ElggFileCache.php.
ElggFileCache::__construct | ( | $cache_path, | |
$max_age = 0 , |
|||
$max_size = 0 |
|||
) |
Set the Elgg cache.
string | $cache_path | The cache path. |
int | $max_age | Maximum age in seconds, 0 if no limit. |
int | $max_size | Maximum size of cache in seconds, 0 if no limit. |
ConfigurationException |
Definition at line 19 of file ElggFileCache.php.
ElggFileCache::__destruct | ( | ) |
Preform cleanup and invalidates cache upon object destruction.
IOException |
Definition at line 183 of file ElggFileCache.php.
ElggFileCache::clear | ( | ) |
Delete all files in the directory of this file cache.
Reimplemented from ElggCache.
Definition at line 161 of file ElggFileCache.php.
|
protected |
Create and return a handle to a file.
string | $filename | Filename to save as |
string | $rw | Write mode |
Definition at line 37 of file ElggFileCache.php.
ElggFileCache::delete | ( | $key | ) |
Invalidate a given key.
string | $key | Name |
Reimplemented from ElggCache.
Definition at line 147 of file ElggFileCache.php.
ElggFileCache::load | ( | $key, | |
$offset = 0 , |
|||
$limit = null |
|||
) |
Load a key.
string | $key | Name |
int | $offset | Offset |
int | $limit | Limit |
Reimplemented from ElggCache.
Definition at line 123 of file ElggFileCache.php.
|
protected |
Create a sanitised filename for the file.
string | $key | The filename |
Definition at line 68 of file ElggFileCache.php.
|
protected |
Create a sanitised filename for the file.
string | $key | The filename |
Definition at line 80 of file ElggFileCache.php.
ElggFileCache::save | ( | $key, | |
$data | |||
) |
Save a key.
string | $key | Name |
string | $data | Value |
Reimplemented from ElggCache.
Definition at line 102 of file ElggFileCache.php.