26 $this->CONFIG = $CONFIG;
43 static $FILE_PATH_CACHE;
45 if (!$FILE_PATH_CACHE) {
46 $FILE_PATH_CACHE = new \ElggFileCache($this->CONFIG->dataroot .
'system_cache/');
49 return $FILE_PATH_CACHE;
71 if ($this->CONFIG->system_cache_enabled) {
87 if ($this->CONFIG->system_cache_enabled) {
110 $this->CONFIG->system_cache_enabled = 1;
126 $this->CONFIG->system_cache_enabled = 0;
139 $this->CONFIG->system_cache_loaded =
false;
141 $this->CONFIG->views = new \stdClass();
143 if (!is_string(
$data)) {
146 $this->CONFIG->views->locations = unserialize(
$data);
149 if (!is_string(
$data)) {
152 $this->CONFIG->view_types = unserialize(
$data);
156 $this->CONFIG->system_cache_loaded =
true;
166 if (!$this->CONFIG->system_cache_enabled) {
171 if (!$this->CONFIG->system_cache_loaded) {
172 $this->
save(
'view_locations', serialize($this->CONFIG->views->locations));
173 $this->
save(
'view_types', serialize($this->CONFIG->view_types));
179 if (!$this->CONFIG->i18n_loaded_from_cache) {
181 foreach ($this->CONFIG->translations as
$lang => $map) {
182 $this->
save(
"$lang.lang", serialize($map));
reset()
Reset the system cache by deleting the caches.
getFileCache()
Returns an object suitable for caching system information.
__construct()
Constructor.
$CONFIG views
Holds information about views.
enable()
Enables the system disk cache.
elgg global
Pointer to the global context.
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...
disable()
Disables the system disk cache.
load($type)
Retrieve the contents of a system cache.