mirror of
https://github.com/getgrav/grav.git
synced 2025-02-20 19:56:53 +01:00
Added new onBeforeCacheClear event
This commit is contained in:
parent
7b2716dab1
commit
74c005d39c
|
|
@ -8,11 +8,13 @@
|
|||
* New retina Media image derivatives array support (``) [#1147](https://github.com/getgrav/grav/pull/1147)
|
||||
* Added stream support for images (``)
|
||||
* Added stream support for links (`[Download PDF](user://data/pdf/my.pdf)`)
|
||||
* Added new `onBeforeCacheClear` event to add custom paths to cache clearing process
|
||||
1. [](#improved)
|
||||
* Added alias `selfupdate` to the `self-upgrade` `bin/gpm` CLI command
|
||||
* Synced `webserver-configs/htaccess.txt` with `.htaccess`
|
||||
* Use permissions field in group details.
|
||||
* Updated vendor libraries
|
||||
* Added a warning on GPM update to update Grav first if needed [#1194](https://github.com/getgrav/grav/pull/1194)
|
||||
1. [](#bugfix)
|
||||
* Fix page collections problem with `@page.modular` [#1178](https://github.com/getgrav/grav/pull/1178)
|
||||
* Fix issue with using a multiple taxonomy filter of which one had no results, thanks to @hughbris [#1184](https://github.com/getgrav/grav/issues/1184)
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ namespace Grav\Common;
|
|||
use \Doctrine\Common\Cache as DoctrineCache;
|
||||
use Grav\Common\Config\Config;
|
||||
use Grav\Common\Filesystem\Folder;
|
||||
use Grav\Common\Grav;
|
||||
use RocketTheme\Toolbox\Event\Event;
|
||||
|
||||
/**
|
||||
* The GravCache object is used throughout Grav to store and retrieve cached data.
|
||||
|
|
@ -356,6 +356,8 @@ class Cache extends Getters
|
|||
$remove_paths = self::$standard_remove;
|
||||
}
|
||||
|
||||
// Clearing cache event to add paths to clear
|
||||
Grav::instance()->fireEvent('onBeforeCacheClear', new Event(['paths' => &$remove_paths]));
|
||||
|
||||
foreach ($remove_paths as $stream) {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user