defined('CLEANCACHE_HOURS') (#5144)

https://github.com/FreshRSS/FreshRSS/issues/4627
This commit is contained in:
maTh 2023-03-04 13:46:46 +01:00 committed by GitHub
parent b5969494f9
commit a7e1428485
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 1 deletions

View File

@ -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);

View File

@ -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) {