diff options
Diffstat (limited to 'lib/private/cache/fileglobal.php')
-rw-r--r-- | lib/private/cache/fileglobal.php | 25 |
1 files changed, 0 insertions, 25 deletions
diff --git a/lib/private/cache/fileglobal.php b/lib/private/cache/fileglobal.php index b7ca3f5eb64..2605340648f 100644 --- a/lib/private/cache/fileglobal.php +++ b/lib/private/cache/fileglobal.php @@ -103,29 +103,4 @@ class FileGlobal { } } } - - static public function gc() { - $appConfig = \OC::$server->getAppConfig(); - $last_run = $appConfig->getValue('core', 'global_cache_gc_lastrun', 0); - $now = time(); - if (($now - $last_run) < 300) { - // only do cleanup every 5 minutes - return; - } - $appConfig->setValue('core', 'global_cache_gc_lastrun', $now); - $cache_dir = self::getCacheDir(); - if($cache_dir and is_dir($cache_dir)) { - $dh=opendir($cache_dir); - if(is_resource($dh)) { - while (($file = readdir($dh)) !== false) { - if($file!='.' and $file!='..') { - $mtime = filemtime($cache_dir.$file); - if ($mtime < $now) { - unlink($cache_dir.$file); - } - } - } - } - } - } } |