From c2ea8d0ee9df2836555030c5bc7eea8ac8f30c79 Mon Sep 17 00:00:00 2001 From: logmanoriginal Date: Sun, 28 Aug 2016 13:09:45 +0200 Subject: [PATCH] [FileCache] Ignore 'format' when generating the file name Previously for each requested format a new cache file was created, though the data is the same. With this the file name no longer depends on the requested output format. --- caches/FileCache.php | 1 + 1 file changed, 1 insertion(+) diff --git a/caches/FileCache.php b/caches/FileCache.php index 2dc506b3..b6e04c37 100644 --- a/caches/FileCache.php +++ b/caches/FileCache.php @@ -88,6 +88,7 @@ class FileCache extends CacheAbstract{ $this->isPrepareCache(); $stringToEncode = $_SERVER['REQUEST_URI'] . http_build_query($this->param); + $stringToEncode = preg_replace('/(\?|&)format=[^&]*/i', '$1', $stringToEncode); return hash('sha1', $stringToEncode) . '.cache'; } }