mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-02 19:36:08 +01:00
Fixed admin cache to detect moved and deleted pages
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
* Added a new **YAML Linter** report to the `Tools - Reports` section
|
||||
1. [](#improved)
|
||||
* Updated package.json scripts to properly use gulp compiler
|
||||
1. [](#bugfix)
|
||||
* Fixed admin cache to detect moved and deleted pages
|
||||
|
||||
# v1.9.2
|
||||
## 04/15/2019
|
||||
|
||||
@@ -168,8 +168,11 @@ class AdminPlugin extends Plugin
|
||||
$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'));
|
||||
$this->grav['cache']->setEnabled($this->config->get('plugins.admin.cache_enabled'));
|
||||
$pages = $this->grav['pages'];
|
||||
if (method_exists($pages, 'setCheckMethod')) {
|
||||
// Force file hash checks to fix caching on moved and deleted pages.
|
||||
$pages->setCheckMethod('hash');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user