32 $this->cache = $cache;
33 $this->config = $config;
42 $this->cache->clear();
73 $cached_data = $this->cache->load(
$type);
74 if (isset($cached_data)) {
86 return $this->cache->delete(
$type);
95 return (
bool) $this->config->system_cache_enabled;
107 $this->config->save(
'system_cache_enabled', 1);
120 $this->config->save(
'system_cache_enabled', 0);
136 if (!$this->config->system_cache_loaded) {
reset()
Reset the system cache by deleting the caches.
isEnabled()
Is system cache enabled.
__construct(ElggCache $cache, Config $config)
Constructor.
if(elgg_trigger_plugin_hook('usersettings:save', 'user', $hooks_params, true)) foreach($request->validation() ->all() as $item) $data
trait Profilable
Make an object accept a timer.
enable()
Enables the system disk cache.
trait Cacheable
Utility trait for injecting cache.
save($type, $data)
Saves a system cache.
_elgg_services()
Get the global service provider.
init()
Initializes the simplecache lastcache variable and creates system cache files when appropriate...
disable()
Disables the system disk cache.
load($type)
Retrieve the contents of a system cache.