diff --git a/CHANGELOG.md b/CHANGELOG.md index 4b22a76af..676fd9e7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ * Vendor library updated to latest * Improved `Session` initialization * Added ability to set a `theme_var()` option in page frontmatter + * Force clearing PHP `clearstatcache` and `opcache-reset` on `Cache::clear()` 1. [](#bugfix) * Fixed issue with image alt tag always getting empted out unless set in markdown * Fixed issue with remote PHP version determination for Grav updates [#1883](https://github.com/getgrav/grav/issues/1883) diff --git a/system/src/Grav/Common/Cache.php b/system/src/Grav/Common/Cache.php index a44c407ca..71eb29ff7 100644 --- a/system/src/Grav/Common/Cache.php +++ b/system/src/Grav/Common/Cache.php @@ -429,6 +429,14 @@ class Cache extends Getters $output[] = ''; } + // Clear stat cache + @clearstatcache(); + + // Clear opcache + if (function_exists('opcache_reset')) { + @opcache_reset(); + } + return $output; }