diff options
author | Andrew Dolgov <[email protected]> | 2019-08-14 08:25:09 +0300 |
---|---|---|
committer | Andrew Dolgov <[email protected]> | 2019-08-14 08:25:09 +0300 |
commit | 65450f8a2bbf325d26177c2589c3a9bbe67d8f80 (patch) | |
tree | 932b65b145294955ac4628cd9b0536c83c392ce6 /classes/rssutils.php | |
parent | b0fbae938dbc7c66c7829a86f7dd0fe6fb689908 (diff) | |
parent | fdb6066bf67751ebb388a3de082d80f5444e3681 (diff) |
Merge branch 'master' of git.tt-rss.org:fox/tt-rss
Diffstat (limited to 'classes/rssutils.php')
-rwxr-xr-x | classes/rssutils.php | 31 |
1 files changed, 3 insertions, 28 deletions
diff --git a/classes/rssutils.php b/classes/rssutils.php index 4c8da4546..6ba5eaa0b 100755 --- a/classes/rssutils.php +++ b/classes/rssutils.php @@ -871,7 +871,7 @@ class RSSUtils { $entry_ref_id = $ref_id; if (RSSUtils::find_article_filter($article_filters, "filter")) { - Debug::log("article is filtered out, nothing to do."); + Debug::log("article is filtered out, nothing to do.", Debug::$LOG_VERBOSE); $pdo->commit(); continue; } @@ -1284,32 +1284,6 @@ class RSSUtils { Debug::log("Removed $num_deleted old lock files."); } - static function expire_cached_files() { - foreach (array("feeds", "images", "export", "upload") as $dir) { - $cache_dir = CACHE_DIR . "/$dir"; - - Debug::log("Expiring $cache_dir", Debug::$LOG_VERBOSE); - - $num_deleted = 0; - - if (is_writable($cache_dir)) { - $files = glob("$cache_dir/*"); - - if ($files) { - foreach ($files as $file) { - if (time() - filemtime($file) > 86400*CACHE_MAX_DAYS) { - unlink($file); - - ++$num_deleted; - } - } - } - } - - Debug::log("$cache_dir: removed $num_deleted files."); - } - } - /** * Source: http://www.php.net/manual/en/function.parse-url.php#104527 * Returns the url query as associative array @@ -1498,7 +1472,8 @@ class RSSUtils { } static function housekeeping_common() { - RSSUtils::expire_cached_files(); + DiskCache::expire(); + RSSUtils::expire_lock_files(); RSSUtils::expire_error_log(); RSSUtils::expire_feed_archive(); |