Elgg  Version 2.3
Public Member Functions | List of all members
ElggStaticVariableCache Class Reference
Inheritance diagram for ElggStaticVariableCache:
ElggSharedMemoryCache ElggCache

Public Member Functions

 __construct ($namespace= 'default')
 Create the variable 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 ()
 Clears the cache for a particular namespace. More...
 
- Public Member Functions inherited from ElggSharedMemoryCache
 setNamespace ($namespace="default")
 Set the namespace of this cache. More...
 
 getNamespace ()
 Get the namespace currently defined. More...
 
- Public Member Functions inherited from ElggCache
 __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)
 Save data in a cache. More...
 
 load ($key, $offset=0, $limit=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...
 
 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...
 

Detailed Description

Definition at line 10 of file ElggStaticVariableCache.php.

Constructor & Destructor Documentation

ElggStaticVariableCache::__construct (   $namespace = 'default')

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
string$namespaceThe namespace for this cache to write to.
Warning
namespaces of the same name are shared!

Definition at line 27 of file ElggStaticVariableCache.php.

Member Function Documentation

ElggStaticVariableCache::clear ( )

Clears the cache for a particular namespace.

Returns
void

Definition at line 87 of file ElggStaticVariableCache.php.

ElggStaticVariableCache::delete (   $key)

Invalidate a given key.

Parameters
string$keyName
Returns
bool

Definition at line 74 of file ElggStaticVariableCache.php.

ElggStaticVariableCache::load (   $key,
  $offset = 0,
  $limit = null 
)

Load a key.

Parameters
string$keyName
int$offsetOffset
int$limitLimit
Returns
string

Definition at line 57 of file ElggStaticVariableCache.php.

ElggStaticVariableCache::save (   $key,
  $data 
)

Save a key.

Parameters
string$keyName
string$dataValue
Returns
boolean

Definition at line 40 of file ElggStaticVariableCache.php.


The documentation for this class was generated from the following file: