Added new Admin cache_enabled option independent of main site.

This commit is contained in:
Andy Miller
2016-09-29 18:14:08 -06:00
parent 2930625923
commit f13bd7983d
5 changed files with 22 additions and 1 deletions

View File

@@ -120,6 +120,11 @@ class AdminPlugin extends Plugin
// Only activate admin if we're inside the admin path.
if ($this->isAdminPath()) {
$this->active = true;
// Set cache based on admin_cache option
if (method_exists($this->grav['cache'], 'setEnabled')) {
$this->grav['cache']->setEnabled($this->config->get('plugins.admin.cache_enabled'));
}
}
}