PHP Class Elgg\Cache\SystemCache

Since: 1.10.0
Inheritance: use trait Elgg\Profilable
Datei anzeigen Open project: elgg/elgg Class Usage Examples

Public Methods

Method Description
__construct ( ElggFileCache $cache, Config $config ) Constructor
disable ( ) : void Disables the system disk cache.
enable ( ) : void Enables the system disk cache.
init ( ) Initializes the simplecache lastcache variable and creates system cache files when appropriate.
isEnabled ( ) : boolean Is system cache enabled
load ( string $type ) : string Retrieve the contents of a system cache.
loadAll ( ) Loads the system cache during engine boot
reset ( ) : void Reset the system cache by deleting the caches
save ( string $type, string $data ) : boolean Saves a system cache.

Method Details

__construct() public method

Constructor
public __construct ( ElggFileCache $cache, Config $config )
$cache ElggFileCache Elgg disk cache
$config Elgg\Config Elgg config

disable() public method

Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.
public disable ( ) : void
return void

enable() public method

Uses the 'system_cache_enabled' config with a boolean value. Resets the system cache.
public enable ( ) : void
return void

init() public method

Initializes the simplecache lastcache variable and creates system cache files when appropriate.
public init ( )

isEnabled() public method

Is system cache enabled
public isEnabled ( ) : boolean
return boolean

load() public method

Retrieve the contents of a system cache.
public load ( string $type ) : string
$type string The type of cache to load
return string

loadAll() public method

Loads the system cache during engine boot
See also: elgg_reset_system_cache()
public loadAll ( )

reset() public method

Reset the system cache by deleting the caches
public reset ( ) : void
return void

save() public method

Saves a system cache.
public save ( string $type, string $data ) : boolean
$type string The type or identifier of the cache
$data string The data to be saved
return boolean