mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2026-01-30 03:10:02 +01:00
Added new Admin cache_enabled option independent of main site.
This commit is contained in:
@@ -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'));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user