[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.
This commit is contained in:
logmanoriginal 2016-08-28 13:09:45 +02:00
parent a8797641fd
commit c2ea8d0ee9

View file

@ -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';
}
}