Elgg  Version 4.3
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, ElggCache $cache)
 Constructor. More...
 
 load ($guid)
 Retrieve a entity from the cache. More...
 
 save (ElggEntity $entity)
 Cache an entity. More...
 
 delete ($guid)
 Invalidate this class's entry in the cache. More...
 
 clear ()
 Clear the entity cache. More...
 

Public Attributes

const MAX_SIZE = 256
 

Detailed Description

Volatile cache for entities.

Definition at line 14 of file EntityCache.php.

Constructor & Destructor Documentation

Elgg\Cache\EntityCache::__construct ( ElggSession  $session,
ElggCache  $cache 
)

Constructor.

Parameters
ElggSession$sessionSession
ElggCache$cacheCache

Definition at line 39 of file EntityCache.php.

Member Function Documentation

Elgg\Cache\EntityCache::clear ( )

Clear the entity cache.

Returns
void

Definition at line 102 of file EntityCache.php.

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

Invalidate this class's entry in the cache.

Parameters
int$guidThe entity guid
Returns
void

Definition at line 83 of file EntityCache.php.

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

Retrieve a entity from the cache.

Parameters
int$guidThe GUID
Returns
|null

Definition at line 51 of file EntityCache.php.

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

Cache an entity.

Parameters
ElggEntity$entityEntity to cache
Returns
void

Definition at line 62 of file EntityCache.php.

Member Data Documentation

const Elgg\Cache\EntityCache::MAX_SIZE = 256

Definition at line 16 of file EntityCache.php.


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