aboutsummaryrefslogtreecommitdiff
path: root/app/Controllers/feedController.php
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2025-08-15 09:37:00 +0200
committerGravatar GitHub <noreply@github.com> 2025-08-15 09:37:00 +0200
commitade9ba88178537a2181c9f27d23c69d6dedad34b (patch)
treec9acb1675560d61e0e2f7f1706f5625b8a334072 /app/Controllers/feedController.php
parentddb9e91bf2b16aa6f31ebdb3a2119056e971ba96 (diff)
Call cleanCache when refreshing feeds (#7827)
Otherwise, it is only called when calling `httpGet()` which can be rare for users not using Web Scraping. https://github.com/FreshRSS/FreshRSS/discussions/7784#discussioncomment-14109207
Diffstat (limited to 'app/Controllers/feedController.php')
-rw-r--r--app/Controllers/feedController.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/Controllers/feedController.php b/app/Controllers/feedController.php
index 97d68883c..4884b237f 100644
--- a/app/Controllers/feedController.php
+++ b/app/Controllers/feedController.php
@@ -862,6 +862,9 @@ class FreshRSS_feed_Controller extends FreshRSS_ActionController {
if ($entryDAO->inTransaction()) {
$entryDAO->commit();
}
+ if (rand(0, 30) === 1) { // Remove old cache once in a while
+ cleanCache(CLEANCACHE_HOURS);
+ }
return [$nbUpdatedFeeds, $feed, $nbNewArticles, $feedsCacheToRefresh];
}