diff --git a/filecache.module b/filecache.module index 1d23094..d6186f6 100644 --- a/filecache.module +++ b/filecache.module @@ -42,8 +42,11 @@ function filecache_cron() { if ($cache->expire == CACHE_PERMANENT) { continue; } - if ($cache->expire == CACHE_TEMPORARY || - $cache->expire < REQUEST_TIME) { + $expiry_date = $cache->expire; + if ($cache->expire == CACHE_TEMPORARY) { + $expiry_date = $cache->created + variable_get('cache_lifetime', 0); + } + if ($expiry_date < REQUEST_TIME) { @unlink($filename); } } // foreach $filename