From aa86232bd3d4b220446b3029ae0e9294c1e558fb Mon Sep 17 00:00:00 2001 From: "eraseyourknees@gmail.com" <112027564+eraseyourknees@users.noreply.github.com> Date: Thu, 25 Aug 2022 17:31:20 +0200 Subject: [PATCH] Use cache version in resource hashes --- shared/cache.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shared/cache.php b/shared/cache.php index d626a42..c25e41d 100644 --- a/shared/cache.php +++ b/shared/cache.php @@ -17,9 +17,11 @@ limitations under the License. class UupDumpCache { private $cacheFile; + private $newCacheVersion = 1; public function __construct($resource, $compressed = true) { - $cacheHash = hash('sha256', strtolower($resource)); + $res = $resource."+cache_v".$this->newCacheVersion; + $cacheHash = hash('sha256', strtolower($res)); $ext = $compressed ? '.json.gz' : '.json'; $this->cacheFile = 'cache/'.$cacheHash.$ext; }