Cache: don't create a new etag when the mtime hasn't changed

This commit is contained in:
Robin Appelman 2013-02-11 13:27:34 +01:00
parent d84c3cd014
commit 2921d2fb78

View file

@ -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);
}