Skip to content
Snippets Groups Projects
Commit e1fe5279 authored by Robin Appelman's avatar Robin Appelman
Browse files

Cache: also preserve etags for files

parent 2921d2fb
Branches
No related tags found
No related merge requests found
......@@ -74,8 +74,11 @@ class Scanner {
$this->scanFile($parent);
}
}
if ($checkExisting and $data['size'] === -1 and $cacheData = $this->cache->get($file)) {
$data['size'] = $cacheData['size'];
if ($checkExisting) {
$cacheData = $this->cache->get($file)
if ($data['size'] === -1) {
$data['size'] = $cacheData['size'];
}
if ($data['mtime'] === $cacheData['mtime']) {
$data['etag'] = $cacheData['etag'];
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment