diff options
| author | 2014-10-28 23:52:46 +0100 | |
|---|---|---|
| committer | 2014-10-28 23:52:46 +0100 | |
| commit | 00127f07c5fc784130d658e3f26519b0279fc6b8 (patch) | |
| tree | 218c057df7edb710e062e4605779840cded156f3 /app/Models/Feed.php | |
| parent | 4cbd7e0583709912d790ed04a72b75d79da31b73 (diff) | |
SimplePie: cache feeds with errors
Before the cache system was not used for feeds with errors, which was
problematic especially if several users have this feed.
Furthermore, there was no protection against repetitive refresh.
Bonus: slightly better performance by avoiding some superfluous
file_exists().
Warning: needs a bit of testing
https://github.com/marienfressinaud/FreshRSS/issues/681
Diffstat (limited to 'app/Models/Feed.php')
| -rw-r--r-- | app/Models/Feed.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/app/Models/Feed.php b/app/Models/Feed.php index 03baf3ad2..bd1babeea 100644 --- a/app/Models/Feed.php +++ b/app/Models/Feed.php @@ -217,7 +217,8 @@ class FreshRSS_Feed extends Minz_Model { $mtime = $feed->init(); if ((!$mtime) || $feed->error()) { - throw new FreshRSS_Feed_Exception($feed->error() . ' [' . $url . ']'); + $errorMessage = $feed->error(); + throw new FreshRSS_Feed_Exception(($errorMessage == '' ? 'Feed error' : $errorMessage) . ' [' . $url . ']'); } if ($loadDetails) { |
