Class ElggStaticVariableCache
ElggStaticVariableCache Dummy cache which stores values in a static array.
Using this makes future replacements to other caching back ends (eg memcache)
much easier.
-
ElggCache
implements
ArrayAccess
-
ElggSharedMemoryCache
-
ElggStaticVariableCache
Methods summary
public
|
#
__construct( string $namespace = 'default' )
Create the variable cache.
Create the variable cache.
This function creates a variable cache in a static variable in memory,
optionally with a given namespace (to avoid overlap).
Parameters
- $namespace
string $namespace The namespace for this cache to write to.
Warning
namespaces of the same name are shared!
Overrides
|
public
boolean
|
#
save( string $key, string $data )
Save a key
Parameters
- $key
string $key Name
- $data
string $data Value
Returns
boolean
|
public
string
|
#
load( string $key, integer $offset = 0, integer $limit = null )
Load a key
Parameters
- $key
string $key Name
- $offset
integer $offset Offset
- $limit
integer $limit Limit
Returns
string
|
public
boolean
|
#
delete( string $key )
Invalidate a given key.
Parameters
Returns
boolean
|
public
|
#
clear( )
Clears the cache for a particular namespace
Clears the cache for a particular namespace
|
Methods inherited from ElggCache
__get(),
__isset(),
__set(),
__unset(),
add(),
getVariable(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
setVariable()
|