Elgg  Version 5.1
Public Member Functions | Public Attributes | Protected Attributes | List of all members
Elgg\Cache\EntityCache Class Reference

Volatile cache for entities. More...

Public Member Functions

 __construct (BaseCache $cache)
 Constructor. More...
 
 load (int $guid)
 Retrieve a entity from the cache. More...
 
 save (\ElggEntity $entity)
 Cache an entity. More...
 
 delete (int $guid)
 Invalidate this class's entry in the cache. More...
 
 clear ()
 Clear the entity cache. More...
 

Public Attributes

const MAX_SIZE = 256
 

Protected Attributes

 $cache
 
 $size = 0
 

Detailed Description

Volatile cache for entities.

Definition at line 10 of file EntityCache.php.

Constructor & Destructor Documentation

Elgg\Cache\EntityCache::__construct ( BaseCache  $cache)

Constructor.

Parameters
BaseCache$cacheCache

Definition at line 29 of file EntityCache.php.

Member Function Documentation

Elgg\Cache\EntityCache::clear ( )

Clear the entity cache.

Returns
void

Definition at line 91 of file EntityCache.php.

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

Invalidate this class's entry in the cache.

Parameters
int$guidThe entity guid
Returns
void

Definition at line 72 of file EntityCache.php.

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

Retrieve a entity from the cache.

Parameters
int$guidThe GUID
Returns
|null

Definition at line 40 of file EntityCache.php.

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

Cache an entity.

Parameters
\ElggEntity$entityEntity to cache
Returns
void

Definition at line 51 of file EntityCache.php.

Member Data Documentation

Elgg\Cache\EntityCache::$cache
protected

Definition at line 17 of file EntityCache.php.

Elgg\Cache\EntityCache::$size = 0
protected

Definition at line 22 of file EntityCache.php.

const Elgg\Cache\EntityCache::MAX_SIZE = 256

Definition at line 12 of file EntityCache.php.


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