Only check unique keys for the comparison on filecache insert & update otherwise
This commit is contained in:
parent
8fa692388b
commit
c917ea183c
|
@ -251,10 +251,15 @@ class Cache {
|
||||||
return trim($item, "`");
|
return trim($item, "`");
|
||||||
}, $queryParts);
|
}, $queryParts);
|
||||||
$values = array_combine($queryParts, $params);
|
$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');
|
return (int)\OC_DB::insertid('*PREFIX*filecache');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The file was created in the mean time
|
||||||
|
$this->update($id, $data);
|
||||||
return $this->getId($file);
|
return $this->getId($file);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue