forked from blallo/rss-bridge
[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).
This commit is contained in:
parent
5ccde61a19
commit
ac0a9a90ad
1 changed files with 1 additions and 4 deletions
|
@ -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';
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue