diff --git a/CHANGELOG.md b/CHANGELOG.md index a73225814..8bdb125f3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,9 @@ * Added `ControllerResponseTrait::createDownloadResponse()` method 1. [](#improved) * Optimized `Flex Pages` for speed + * Clearing cache now deletes all clockwork files +1. [](#bugfix) + * Fixed clockwork error when clearing cache # v1.7.7 ## 02/23/2021 diff --git a/system/src/Grav/Common/Cache.php b/system/src/Grav/Common/Cache.php index 24f1d4010..65270911b 100644 --- a/system/src/Grav/Common/Cache.php +++ b/system/src/Grav/Common/Cache.php @@ -71,6 +71,7 @@ class Cache extends Getters 'cache://twig/', 'cache://doctrine/', 'cache://compiled/', + 'cache://clockwork/', 'cache://validated-', 'cache://images', 'asset://', @@ -80,6 +81,7 @@ class Cache extends Getters 'cache://twig/', 'cache://doctrine/', 'cache://compiled/', + 'cache://clockwork/', 'cache://validated-', 'asset://', ]; @@ -311,7 +313,7 @@ class Cache extends Getters if ($password && !$redis->auth($password)) { throw new \RedisException('Redis authentication failed'); } - + // Select alternate ( !=0 ) database ID if set if ($databaseId && !$redis->select($databaseId)) { throw new \RedisException('Could not select alternate Redis database ID'); @@ -498,7 +500,7 @@ class Cache extends Getters $anything = true; } } elseif (is_dir($file)) { - if (Folder::delete($file)) { + if (Folder::delete($file, false)) { $anything = true; } }