Elgg  Version master
Public Member Functions | List of all members
Elgg\Cache\EntityCache Class Reference

Volatile cache for entities. More...

Public Member Functions

 __construct (protected 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...
 

Detailed Description

Volatile cache for entities.

Definition at line 10 of file EntityCache.php.

Constructor & Destructor Documentation

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

Constructor.

Parameters
BaseCache$cacheCache

Definition at line 17 of file EntityCache.php.

Member Function Documentation

Elgg\Cache\EntityCache::clear ( )

Clear the entity cache.

Returns
void

Definition at line 62 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 53 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 27 of file EntityCache.php.

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

Cache an entity.

Parameters
\ElggEntity$entityEntity to cache
Returns
void

Definition at line 38 of file EntityCache.php.


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