Elgg  Version 2.2
 All Classes Namespaces Files Functions Variables Pages
Public Member Functions | Public Attributes | List of all members
Elgg\Cache\EntityCache Class Reference

Volatile cache for entities. More...

Public Member Functions

 __construct (ElggSession $session, MetadataCache $metadata_cache)
 Constructor. More...
 
 get ($guid)
 Retrieve a entity from the cache. More...
 
 set (ElggEntity $entity)
 Cache an entity. More...
 
 remove ($guid)
 Invalidate this class's entry in the cache. More...
 
 clear ()
 Clear the entity cache. More...
 
 disableCachingForEntity ($guid)
 Remove this entity from the entity cache and make sure it is not re-added. More...
 
 enableCachingForEntity ($guid)
 Allow this entity to be stored in the entity cache. More...
 

Public Attributes

const MAX_SIZE = 256
 

Detailed Description

Volatile cache for entities.

private

Definition at line 12 of file EntityCache.php.

Constructor & Destructor Documentation

Elgg\Cache\EntityCache::__construct ( ElggSession  $session,
MetadataCache  $metadata_cache 
)

Constructor.

Parameters
ElggSession$sessionSession
MetadataCache$metadata_cacheMD cache

Definition at line 43 of file EntityCache.php.

Member Function Documentation

Elgg\Cache\EntityCache::clear ( )

Clear the entity cache.

Returns
void

Definition at line 128 of file EntityCache.php.

Elgg\Cache\EntityCache::disableCachingForEntity (   $guid)

Remove this entity from the entity cache and make sure it is not re-added.

Parameters
int$guidThe entity guid
Returns
void

Definition at line 142 of file EntityCache.php.

Elgg\Cache\EntityCache::enableCachingForEntity (   $guid)

Allow this entity to be stored in the entity cache.

Parameters
int$guidThe entity guid
Returns
void

Definition at line 153 of file EntityCache.php.

Elgg\Cache\EntityCache::get (   $guid)

Retrieve a entity from the cache.

Parameters
int$guidThe GUID
Returns
|false false if entity not cached, or not fully loaded

Definition at line 57 of file EntityCache.php.

Elgg\Cache\EntityCache::remove (   $guid)

Invalidate this class's entry in the cache.

Parameters
int$guidThe entity guid
Returns
void

Definition at line 104 of file EntityCache.php.

Elgg\Cache\EntityCache::set ( ElggEntity  $entity)

Cache an entity.

Parameters
ElggEntity$entityEntity to cache
Returns
void

Definition at line 73 of file EntityCache.php.

Member Data Documentation

const Elgg\Cache\EntityCache::MAX_SIZE = 256

Definition at line 15 of file EntityCache.php.


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