]> source.dussan.org Git - nextcloud-server.git/commitdiff
Do not expire chunks while checking for their existence
authorVincent Petry <pvince81@owncloud.com>
Thu, 3 Apr 2014 19:12:35 +0000 (21:12 +0200)
committerVincent Petry <pvince81@owncloud.com>
Thu, 3 Apr 2014 19:12:35 +0000 (21:12 +0200)
The expiration should be done by the gc() function on login, not while
isComplete() is calling hasKey() for every chunk.

lib/private/cache/file.php

index be6805a9a57aea7e95419e38382e1f498f7b1fbc..2fd77c437fe1899a7b92baa77b0dff194e4ef901 100644 (file)
@@ -84,11 +84,6 @@ class File {
        public function hasKey($key) {
                $storage = $this->getStorage();
                if ($storage && $storage->is_file($key)) {
-                       $mtime = $storage->filemtime($key);
-                       if ($mtime < time()) {
-                               $storage->unlink($key);
-                               return false;
-                       }
                        return true;
                }
                return false;