mirror of
https://github.com/nextcloud/server.git
synced 2026-06-27 09:30:36 -04:00
Cache: don't create a new etag when the mtime hasn't changed
This commit is contained in:
parent
d84c3cd014
commit
2921d2fb78
1 changed files with 3 additions and 0 deletions
3
lib/files/cache/scanner.php
vendored
3
lib/files/cache/scanner.php
vendored
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue