66 if ((
$view ===
'js' ||
$view ===
'css') && 0 === strpos($subview,
$view .
'/')) {
72 if (!empty($subview)) {
73 $view =
"$view/$subview";
79 $this->views->registerCacheableView(
$view);
92 $lastcache = (int) $this->config->lastcache;
106 return (
bool) $this->config->simplecache_enabled;
116 $this->config->save(
'simplecache_enabled', 1);
129 if ($this->config->simplecache_enabled) {
130 $this->config->save(
'simplecache_enabled', 0);
141 private function getPath() {
142 return $this->config->assetroot;
155 $this->config->save(
"simplecache_lastupdate",
$time);
156 $this->config->lastcache =
$time;
__construct(Config $config, ViewsService $views)
Constructor.
static canonicalizeViewName($alias)
Takes a view name and returns the canonical name for that view.
isEnabled()
Is simple cache enabled.
disable()
Disables the simple cache.
getRoot()
Get the base url for simple cache requests.
elgg_get_viewtype()
Return the current view type.
invalidate()
Deletes all cached views in the simplecache and sets the lastcache and lastupdate time to 0 for every...
getUrl($view, $subview= '')
Get the URL for the cached view.
enable()
Enables the simple cache.
if(!$owner||!$owner->canEdit()) if(!$owner->hasIcon('master')) if(!$owner->saveIconFromElggFile($owner->getIcon('master'), 'icon', $coords)) $view
if(!$entity instanceof ElggEntity) $time
_elgg_rmdir($dir, $empty=false)
Recursively deletes a directory, including all hidden files.