summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-02-11 13:27:34 +0100
committerRobin Appelman <icewind@owncloud.com>2013-02-11 13:33:56 +0100
commit2921d2fb785f265bb3bf17873ada304145d49aec (patch)
tree7feff78acb623b9c8b4225e2caabb342bcbf5c6d /lib
parentd84c3cd014fd73930cd15aee64d57aad3383b2aa (diff)
downloadnextcloud-server-2921d2fb785f265bb3bf17873ada304145d49aec.tar.gz
nextcloud-server-2921d2fb785f265bb3bf17873ada304145d49aec.zip
Cache: don't create a new etag when the mtime hasn't changed
Diffstat (limited to 'lib')
-rw-r--r--lib/files/cache/scanner.php3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/files/cache/scanner.php b/lib/files/cache/scanner.php
index ec216264429..7f19261d972 100644
--- a/lib/files/cache/scanner.php
+++ b/lib/files/cache/scanner.php
@@ -76,6 +76,9 @@ class Scanner {
}
if ($checkExisting and $data['size'] === -1 and $cacheData = $this->cache->get($file)) {
$data['size'] = $cacheData['size'];
+ if ($data['mtime'] === $cacheData['mtime']) {
+ $data['etag'] = $cacheData['etag'];
+ }
}
$this->cache->put($file, $data);
}