aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--constants.php3
-rw-r--r--lib/lib_rss.php2
2 files changed, 4 insertions, 1 deletions
diff --git a/constants.php b/constants.php
index a8ac6e5ac..b4c129e87 100644
--- a/constants.php
+++ b/constants.php
@@ -57,3 +57,6 @@ defined('EXTENSIONS_PATH') or define('EXTENSIONS_PATH', FRESHRSS_PATH . '/extens
//Directory used for feed mutex with *.freshrss.lock files. Must be writable.
defined('TMP_PATH') or define('TMP_PATH', sys_get_temp_dir());
+
+//clean the chacke after x hours (720 hours = 30 days)
+defined('CLEANCACHE_HOURS') or define('CLEANCACHE_HOURS', 720);
diff --git a/lib/lib_rss.php b/lib/lib_rss.php
index 434d0f9fb..76e7b92cd 100644
--- a/lib/lib_rss.php
+++ b/lib/lib_rss.php
@@ -434,7 +434,7 @@ function httpGet(string $url, string $cachePath, string $type = 'html', array $a
}
if (mt_rand(0, 30) === 1) { // Remove old entries once in a while
- cleanCache();
+ cleanCache(CLEANCACHE_HOURS);
}
if (FreshRSS_Context::$system_conf->simplepie_syslog_enabled) {