diff options
| author | 2020-03-28 20:24:31 +0100 | |
|---|---|---|
| committer | 2020-03-28 20:24:31 +0100 | |
| commit | e424f45b8cd4274160e91d4c1e9e3ba0c2771e55 (patch) | |
| tree | d94cc04eadea4278686b7c54b9b03a846b3501de /lib | |
| parent | cb4d009ebb986b896b181e27d2592837b2a2c3d8 (diff) | |
SimplePie use distint cache for force_feed (#2852)
#fix https://github.com/FreshRSS/FreshRSS/issues/2524
In general, we should avoid using the same cache for feeds that are fetched with distinct parameters / settings..
PR upstream to SimplePie https://github.com/simplepie/simplepie/pull/643
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/SimplePie/SimplePie.php | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/SimplePie/SimplePie.php b/lib/SimplePie/SimplePie.php index e7ecae5e7..fe717a823 100644 --- a/lib/SimplePie/SimplePie.php +++ b/lib/SimplePie/SimplePie.php @@ -1417,7 +1417,8 @@ class SimplePie // Decide whether to enable caching if ($this->cache && $parsed_feed_url['scheme'] !== '') { - $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $this->feed_url), 'spc')); + $url = $this->feed_url . ($this->force_feed ? '#force_feed' : ''); //FreshRSS + $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $url), 'spc')); } // Fetch the data via SimplePie_File into $this->raw_data @@ -1771,7 +1772,8 @@ class SimplePie { trigger_error("$this->cache_location is not writable. Make sure you've set the correct relative or absolute path, and that the location is server-writable.", E_USER_WARNING); } - $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $file->url), 'spc')); + $url = $this->feed_url . ($this->force_feed ? '#force_feed' : ''); //FreshRSS + $cache = $this->registry->call('Cache', 'get_handler', array($this->cache_location, call_user_func($this->cache_name_function, $url), 'spc')); } } $this->feed_url = $file->url; |
