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

Cache Service. More...

Inheritance diagram for Elgg\Cache\CacheService:
Elgg\Cache\AccessCache Elgg\Cache\AutoloadCache Elgg\Cache\BootCache Elgg\Cache\EntityCache Elgg\Cache\MetadataCache Elgg\Cache\PluginsCache Elgg\Cache\QueryCache Elgg\Cache\ServerCache Elgg\Cache\SystemCache

Public Member Functions

 purge ()
 Purges the caches. More...
 
 invalidate ()
 Invalidates the caches. More...
 
 clear ()
 Clears the caches. More...
 
 save (string $key, mixed $data, int|\DateTime $expire_after=null)
 Saves data in the cache. More...
 
 load (string $key)
 Retrieve the contents of a cached item. More...
 
 delete (string $key)
 Deletes the contents of a cached item. More...
 
 isEnabled ()
 Is the cache enabled. More...
 
 enable ()
 Enables the cache. More...
 
 disable ()
 Disables the cache. More...
 

Protected Attributes

CompositeCache $cache
 
bool $enabled = true
 

Detailed Description

Cache Service.

Definition at line 11 of file CacheService.php.

Member Function Documentation

Elgg\Cache\CacheService::clear ( )

Clears the caches.

Returns
void

Definition at line 40 of file CacheService.php.

Elgg\Cache\CacheService::delete ( string  $key)

Deletes the contents of a cached item.

Parameters
string$keyIdentifier of the cached item
Returns
bool

Definition at line 75 of file CacheService.php.

Elgg\Cache\CacheService::disable ( )

Disables the cache.

Returns
void

Definition at line 102 of file CacheService.php.

Elgg\Cache\CacheService::enable ( )

Enables the cache.

Returns
void

Definition at line 93 of file CacheService.php.

Elgg\Cache\CacheService::invalidate ( )

Invalidates the caches.

Returns
void

Definition at line 31 of file CacheService.php.

Elgg\Cache\CacheService::isEnabled ( )

Is the cache enabled.

Returns
bool

Definition at line 84 of file CacheService.php.

Elgg\Cache\CacheService::load ( string  $key)

Retrieve the contents of a cached item.

Parameters
string$keyIdentifier of the cached item
Returns
mixed null if key not found in cache

Definition at line 64 of file CacheService.php.

Elgg\Cache\CacheService::purge ( )

Purges the caches.

Returns
void

Definition at line 22 of file CacheService.php.

Elgg\Cache\CacheService::save ( string  $key,
mixed  $data,
int|\DateTime  $expire_after = null 
)

Saves data in the cache.

Parameters
string$keyIdentifier of the cached item
mixed$dataThe data to be saved
int | \DateTime | null$expire_afterNumber of seconds to expire the cache after
Returns
bool

Definition at line 53 of file CacheService.php.

Member Data Documentation

CompositeCache Elgg\Cache\CacheService::$cache
protected

Definition at line 13 of file CacheService.php.

bool Elgg\Cache\CacheService::$enabled = true
protected

Definition at line 15 of file CacheService.php.


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