Only invalidate cache on creating new/deleting page to speed up the recovery

This commit is contained in:
Matias Griese
2019-04-26 10:03:06 +03:00
parent f02400ad13
commit 044ab3a578
2 changed files with 3 additions and 2 deletions

View File

@@ -5,6 +5,7 @@
* 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
* Only invalidate cache on creating new/deleting page to speed up the recovery
1. [](#bugfix) 1. [](#bugfix)
* Fixed admin cache to detect moved and deleted pages * Fixed admin cache to detect moved and deleted pages

View File

@@ -496,7 +496,7 @@ class AdminController extends AdminBaseController
$new_path = $path . '/' . $orderOfNewFolder . '.' . $data['folder']; $new_path = $path . '/' . $orderOfNewFolder . '.' . $data['folder'];
Folder::create($new_path); Folder::create($new_path);
Cache::clearCache('standard'); Cache::clearCache('invalidate');
$this->grav->fireEvent('onAdminAfterSaveAs', new Event(['path' => $new_path])); $this->grav->fireEvent('onAdminAfterSaveAs', new Event(['path' => $new_path]));
@@ -2203,7 +2203,7 @@ class AdminController extends AdminBaseController
$this->grav->fireEvent('onAdminAfterDelete', new Event(['page' => $page])); $this->grav->fireEvent('onAdminAfterDelete', new Event(['page' => $page]));
Cache::clearCache('standard'); Cache::clearCache('invalidate');
// Set redirect to pages list. // Set redirect to pages list.
$redirect = 'pages'; $redirect = 'pages';