mirror of
https://github.com/getgrav/grav-plugin-admin.git
synced 2025-11-01 10:56:08 +01:00
Only invalidate cache on creating new/deleting page to speed up the recovery
This commit is contained in:
@@ -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
|
||||||
|
|
||||||
|
|||||||
@@ -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';
|
||||||
|
|||||||
Reference in New Issue
Block a user