return $cacheEntry->getId();
}, $children);
- $childIdChunks = array_chunk($childIds, 2048);
- foreach ($childIdChunks as $childIdChunk) {
- $query = $this->getQueryBuilder();
- $query->delete('filecache_extended')
- ->where($query->expr()->in('fileid', $query->createNamedParameter($childIdChunk, IQueryBuilder::PARAM_INT_ARRAY)));
+ $query = $this->getQueryBuilder();
+ $query->delete('filecache_extended')
+ ->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();
}
}
}
- $parentIdChunks = array_chunk($parentIds, 2048);
- foreach ($parentIdChunks as $parentIdChunk) {
- $query = $this->getQueryBuilder();
- $query->delete('filecache')
- ->whereParentIn($parentIdChunk);
+ $query = $this->getQueryBuilder();
+ $query->delete('filecache')
+ ->whereParentInParameter('parentIds');
+
+ foreach (array_chunk($parentIds, 1000) as $parentIdChunk) {
+ $query->setParameter('parentIds', $parentIdChunk, IQueryBuilder::PARAM_INT_ARRAY);
$query->execute();
}
}
return $this;
}
- public function whereParentIn(array $parents) {
+ public function whereParentInParameter(string $parameter) {
$alias = $this->alias;
if ($alias) {
$alias .= '.';
$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;
}