mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-03 11:55:52 +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
|
* Added a new **YAML Linter** report to the `Tools - Reports` section
|
||||||
1. [](#improved)
|
1. [](#improved)
|
||||||
* Updated package.json scripts to properly use gulp compiler
|
* Updated package.json scripts to properly use gulp compiler
|
||||||
|
1. [](#bugfix)
|
||||||
|
* Fixed admin cache to detect moved and deleted pages
|
||||||
|
|
||||||
# v1.9.2
|
# v1.9.2
|
||||||
## 04/15/2019
|
## 04/15/2019
|
||||||
|
|||||||
@@ -168,8 +168,11 @@ class AdminPlugin extends Plugin
|
|||||||
$this->active = true;
|
$this->active = true;
|
||||||
|
|
||||||
// Set cache based on admin_cache option
|
// 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