mirror of
https://github.com/getgrav/grav.git
synced 2026-07-19 17:22:02 +02:00
Merge branch 'develop' of github.com:getgrav/grav into develop
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
1. [](#new)
|
||||
* Added `Route::withoutParams()` methods
|
||||
* Added `Pages::setCheckMethod()` method to override page configuration in Admin Plugin
|
||||
* Added `Cache::clearCache('invalidate')` parameter for just invalidating the cache without deleting any cached files
|
||||
1. [](#bugfix)
|
||||
* Fixed `$grav['route']` from being modified when the route instance gets modified
|
||||
* Fixed Assets options array mixed with standalone priority [#2477](https://github.com/getgrav/grav/issues/2477)
|
||||
|
||||
@@ -437,6 +437,9 @@ class Cache extends Getters
|
||||
case 'tmp-only':
|
||||
$remove_paths = self::$tmp_remove;
|
||||
break;
|
||||
case 'invalidate':
|
||||
$remove_paths = [];
|
||||
break;
|
||||
default:
|
||||
if (Grav::instance()['config']->get('system.cache.clear_images_by_default')) {
|
||||
$remove_paths = self::$standard_remove;
|
||||
|
||||
@@ -21,6 +21,7 @@ class ClearCacheCommand extends ConsoleCommand
|
||||
->setName('cache')
|
||||
->setAliases(['clearcache', 'cache-clear'])
|
||||
->setDescription('Clears Grav cache')
|
||||
->addOption('invalidate', null, InputOption::VALUE_NONE, 'Invalidate cache, but do not remove any files')
|
||||
->addOption('purge', null, InputOption::VALUE_NONE, 'If set purge old caches')
|
||||
->addOption('all', null, InputOption::VALUE_NONE, 'If set will remove all including compiled, twig, doctrine caches')
|
||||
->addOption('assets-only', null, InputOption::VALUE_NONE, 'If set will remove only assets/*')
|
||||
@@ -64,6 +65,8 @@ class ClearCacheCommand extends ConsoleCommand
|
||||
$remove = 'cache-only';
|
||||
} elseif ($this->input->getOption('tmp-only')) {
|
||||
$remove = 'tmp-only';
|
||||
} elseif ($this->input->getOption('invalidate')) {
|
||||
$remove = 'invalidate';
|
||||
} else {
|
||||
$remove = 'standard';
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user