Elgg  Version 4.x
Public Member Functions | List of all members
Elgg\Cache\SystemCache Class Reference

System Cache. More...

Public Member Functions

 __construct (\ElggCache $cache, Config $config)
 Constructor. More...
 
 reset ()
 Reset the system cache by deleting the caches. More...
 
 save ($type, $data, int $expire_after=null)
 Saves a system cache. More...
 
 load ($type)
 Retrieve the contents of a system cache. More...
 
 delete ($type)
 Deletes the contents of a system cache. More...
 
 isEnabled ()
 Is system cache enabled. More...
 
 enable ()
 Enables the system disk cache. More...
 
 disable ()
 Disables the system disk cache. More...
 
 init ()
 Initializes the system cache. More...
 

Detailed Description

System Cache.

Definition at line 14 of file SystemCache.php.

Constructor & Destructor Documentation

Elgg\Cache\SystemCache::__construct ( \ElggCache  $cache,
Config  $config 
)

Constructor.

Parameters
\ElggCache$cacheElgg disk cache
Config$configElgg config

Definition at line 29 of file SystemCache.php.

Member Function Documentation

Elgg\Cache\SystemCache::delete (   $type)

Deletes the contents of a system cache.

Parameters
string$typeThe type of cache to delete
Returns
bool

Definition at line 84 of file SystemCache.php.

Elgg\Cache\SystemCache::disable ( )

Disables the system disk cache.

Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.

Returns
void

Definition at line 118 of file SystemCache.php.

Elgg\Cache\SystemCache::enable ( )

Enables the system disk cache.

Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.

Returns
void

Definition at line 105 of file SystemCache.php.

Elgg\Cache\SystemCache::init ( )

Initializes the system cache.

Returns
void

Definition at line 128 of file SystemCache.php.

Elgg\Cache\SystemCache::isEnabled ( )

Is system cache enabled.

Returns
bool

Definition at line 93 of file SystemCache.php.

Elgg\Cache\SystemCache::load (   $type)

Retrieve the contents of a system cache.

Parameters
string$typeThe type of cache to load
Returns
mixed null if key not found in cache

Definition at line 67 of file SystemCache.php.

Elgg\Cache\SystemCache::reset ( )

Reset the system cache by deleting the caches.

Returns
void

Definition at line 39 of file SystemCache.php.

Elgg\Cache\SystemCache::save (   $type,
  $data,
int  $expire_after = null 
)

Saves a system cache.

Parameters
string$typeThe type or identifier of the cache
mixed$dataThe data to be saved
int$expire_afterNumber of seconds to expire the cache after
Returns
bool

Definition at line 52 of file SystemCache.php.


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