Elgg
Version 3.0
|
Composite cache pool. More...
Public Member Functions | |
__construct ($namespace, Config $config, $flags) | |
Constructor. More... | |
getPool () | |
Returns cache pool. More... | |
save ($key, $data, $ttl=null) | |
Save data in a cache. More... | |
load ($key, $invalidation_method=null) | |
Load data from the cache using a given key. More... | |
delete ($key) | |
Invalidate a key. More... | |
clear () | |
Clear out all the contents of the cache. More... | |
setNamespace ($namespace="default") | |
Set the namespace of this cache. More... | |
getNamespace () | |
Get the namespace currently defined. More... | |
namespaceKey ($key) | |
Namespace the key. 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... | |
save ($key, $data, $expire_after=null) | |
Save data in a cache. More... | |
load ($key) | |
Load data from the cache using a given key. More... | |
delete ($key) | |
Invalidate a key. More... | |
clear () | |
Clear out all the contents of the cache. More... | |
disable () | |
Disable cache Do not write or read from cache. More... | |
enable () | |
Enable disabled cache. More... | |
populate ($values, $expires_after) | |
Populate cache from an array of key => values. 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 | |
createPool () | |
Create a new composite stash pool. More... | |
buildApcDriver () | |
Builds APC driver. More... | |
buildRedisDriver () | |
Builds Redis driver. More... | |
buildMemcachedDriver () | |
Builds Memcached driver. More... | |
buildFileSystemDriver () | |
Builds file system driver. More... | |
buildEphemeralDriver () | |
Builds in-memory driver. More... | |
buildBlackHoleDriver () | |
Builds null cache driver. More... | |
Protected Attributes | |
$ttl = 86400 | |
TTL of saved items (default timeout after a day to prevent anything getting too stale) More... | |
$config | |
$flags | |
$pool | |
$namespace | |
![]() | |
$disabled = false | |
Composite cache pool.
Definition at line 22 of file CompositeCache.php.
Elgg\Cache\CompositeCache::__construct | ( | $namespace, | |
Config | $config, | ||
$flags | |||
) |
|
protected |
|
protected |
|
protected |
|
protected |
Builds file system driver.
Definition at line 301 of file CompositeCache.php.
|
protected |
|
protected |
Elgg\Cache\CompositeCache::clear | ( | ) |
Clear out all the contents of the cache.
Definition at line 168 of file CompositeCache.php.
|
protected |
Create a new composite stash pool.
Definition at line 212 of file CompositeCache.php.
Elgg\Cache\CompositeCache::delete | ( | $key | ) |
Invalidate a key.
string | $key | Name |
Definition at line 149 of file CompositeCache.php.
Elgg\Cache\CompositeCache::getNamespace | ( | ) |
Get the namespace currently defined.
Definition at line 192 of file CompositeCache.php.
Elgg\Cache\CompositeCache::getPool | ( | ) |
Elgg\Cache\CompositeCache::load | ( | $key, | |
$invalidation_method = null |
|||
) |
Load data from the cache using a given key.
string | $key | Name |
array | $invalidation_method | Stash invalidation method arguments |
Definition at line 109 of file CompositeCache.php.
Elgg\Cache\CompositeCache::namespaceKey | ( | $key | ) |
Namespace the key.
string | $key | Value name |
Definition at line 203 of file CompositeCache.php.
Elgg\Cache\CompositeCache::save | ( | $key, | |
$data, | |||
$ttl = null |
|||
) |
Save data in a cache.
string | $key | Name |
mixed | $data | Value |
int | DateTime | $ttl | Expire value after |
Definition at line 84 of file CompositeCache.php.
Elgg\Cache\CompositeCache::setNamespace | ( | $namespace = "default" | ) |
Set the namespace of this cache.
This is useful for cache types (like memcache or static variables) where there is one large flat area of memory shared across all instances of the cache.
string | $namespace | Namespace for cache |
Definition at line 183 of file CompositeCache.php.
|
protected |
Definition at line 32 of file CompositeCache.php.
|
protected |
Definition at line 37 of file CompositeCache.php.
|
protected |
Definition at line 47 of file CompositeCache.php.
|
protected |
Definition at line 42 of file CompositeCache.php.
|
protected |
TTL of saved items (default timeout after a day to prevent anything getting too stale)
Definition at line 27 of file CompositeCache.php.