mirror of
https://github.com/nextcloud/server.git
synced 2026-06-08 08:16:43 -04:00
Merge pull request #29507 from nextcloud/backport/29281/stable21
This commit is contained in:
commit
8469b44d57
2 changed files with 14 additions and 6 deletions
|
|
@ -587,8 +587,12 @@ class Cache implements ICache {
|
|||
|
||||
$query = $this->getQueryBuilder();
|
||||
$query->delete('filecache_extended')
|
||||
->where($query->expr()->in('fileid', $query->createNamedParameter($childIds, IQueryBuilder::PARAM_INT_ARRAY)));
|
||||
$query->execute();
|
||||
->where($query->expr()->in('fileid', $query->createParameter('childIds')));
|
||||
|
||||
foreach (array_chunk($childIds, 1000) as $childIdChunk) {
|
||||
$query->setParameter('childIds', $childIdChunk, IQueryBuilder::PARAM_INT_ARRAY);
|
||||
$query->execute();
|
||||
}
|
||||
|
||||
/** @var ICacheEntry[] $childFolders */
|
||||
$childFolders = array_filter($children, function ($child) {
|
||||
|
|
@ -602,8 +606,12 @@ class Cache implements ICache {
|
|||
|
||||
$query = $this->getQueryBuilder();
|
||||
$query->delete('filecache')
|
||||
->whereParentIn($parentIds);
|
||||
$query->execute();
|
||||
->whereParentInParameter('parentIds');
|
||||
|
||||
foreach (array_chunk($parentIds, 1000) as $parentIdChunk) {
|
||||
$query->setParameter('parentIds', $parentIdChunk, IQueryBuilder::PARAM_INT_ARRAY);
|
||||
$query->execute();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ class CacheQueryBuilder extends QueryBuilder {
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function whereParentIn(array $parents) {
|
||||
public function whereParentInParameter(string $parameter) {
|
||||
$alias = $this->alias;
|
||||
if ($alias) {
|
||||
$alias .= '.';
|
||||
|
|
@ -103,7 +103,7 @@ class CacheQueryBuilder extends QueryBuilder {
|
|||
$alias = '';
|
||||
}
|
||||
|
||||
$this->andWhere($this->expr()->in("{$alias}parent", $this->createNamedParameter($parents, IQueryBuilder::PARAM_INT_ARRAY)));
|
||||
$this->andWhere($this->expr()->in("{$alias}parent", $this->createParameter($parameter)));
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue