From ac0a9a90ad13049d503a4c4e222d7ca3f1bde6d3 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sat, 8 Oct 2016 15:17:08 +0200 Subject: [PATCH] [FileCache] Build file name solely on given parameters Previously the cache file name was build on the original request URI which also included the parameters. This could result in different file name for the same request (different format). Removing the format from the request is already done in index.php and could lead to issues in the future (if new parameters are introduced). --- caches/FileCache.php | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/caches/FileCache.php b/caches/FileCache.php index 58b7928..261fe0c 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -107,9 +107,6 @@ class FileCache implements CacheInterface { */ protected function getCacheName(){ $this->isPrepareCache(); - - $stringToEncode = $_SERVER['REQUEST_URI'] . http_build_query($this->param); - $stringToEncode = preg_replace('/(\?|&)format=[^&]*/i', '$1', $stringToEncode); - return hash('sha1', $stringToEncode) . '.cache'; + return hash('sha1', http_build_query($this->param)) . '.cache'; } }