Only check unique keys for the comparison on filecache insert & update otherwise

remotes/origin/etag-endpoint
Joas Schilling 11 years ago committed by Thomas Müller
parent 8fa692388b
commit c917ea183c
  1. 7
      lib/private/files/cache/cache.php

@ -251,10 +251,15 @@ class Cache {
return trim($item, "`");
}, $queryParts);
$values = array_combine($queryParts, $params);
if (\OC::$server->getDatabaseConnection()->insertIfNotExist('*PREFIX*filecache', $values)) {
if (\OC::$server->getDatabaseConnection()->insertIfNotExist('*PREFIX*filecache', $values, [
'storage',
'path_hash',
])) {
return (int)\OC_DB::insertid('*PREFIX*filecache');
}
// The file was created in the mean time
$this->update($id, $data);
return $this->getId($file);
}
}

Loading…
Cancel
Save