44 $this->cache = $cache;
45 $this->config = $config;
46 $this->datalist = $datalist;
55 $this->cache->clear();
81 $cached_data = $this->cache->load(
$type);
96 return (
bool)$this->config->getVolatile(
'system_cache_enabled');
108 $this->datalist->set(
'system_cache_enabled', 1);
109 $this->config->set(
'system_cache_enabled', 1);
122 $this->datalist->set(
'system_cache_enabled', 0);
123 $this->config->set(
'system_cache_enabled', 0);
135 $this->timer->begin([__METHOD__]);
138 $this->config->set(
'system_cache_loaded',
false);
145 if (!is_string(
$data)) {
148 $GLOBALS[
'_ELGG']->view_types = unserialize(
$data);
152 $this->config->set(
'system_cache_loaded',
true);
155 $this->timer->end([__METHOD__]);
171 if (!$this->config->getVolatile(
'system_cache_loaded')) {
172 $this->
save(
'view_types', serialize($GLOBALS[
'_ELGG']->
view_types));
177 if (!$GLOBALS[
'_ELGG']->i18n_loaded_from_cache) {
182 $this->
save(
"$lang.lang", serialize($map));
reset()
Reset the system cache by deleting the caches.
isEnabled()
Is system cache enabled.
__construct(ElggFileCache $cache, Config $config, Datalist $datalist)
Constructor.
$_ELGG translations
String translations for the current language.
Access to configuration values.
trait Profilable
Make an object accept a timer.
$_ELGG view_types
A list of valid view types as discovered.
enable()
Enables the system disk cache.
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
loadAll()
Loads the system cache during engine boot.
save($type, $data)
Saves a system cache.
init()
Initializes the simplecache lastcache variable and creates system cache files when appropriate...
http free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
disable()
Disables the system disk cache.
load($type)
Retrieve the contents of a system cache.