30 $this->cache = $cache;
31 $this->config = $config;
40 $this->cache->clear();
54 return $this->cache->save(
$type,
$data, $expire_after);
72 $cached_data = $this->cache->load(
$type);
73 if (isset($cached_data)) {
85 return $this->cache->delete(
$type);
94 return (
bool) $this->config->system_cache_enabled;
106 $this->config->save(
'system_cache_enabled', 1);
119 $this->config->save(
'system_cache_enabled', 0);
134 if (!$this->config->system_cache_loaded) {
reset()
Reset the system cache by deleting the caches.
isEnabled()
Is system cache enabled.
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
__construct(\ElggCache $cache, Config $config)
Constructor.
enable()
Enables the system disk cache.
_elgg_services()
Get the global service provider.
save($type, $data, int $expire_after=null)
Saves a system cache.
init()
Initializes the system cache.
disable()
Disables the system disk cache.
trait Cacheable
Utility trait for injecting cache.
load($type)
Retrieve the contents of a system cache.