diff --git a/src/Service/CacheService.php b/src/Service/CacheService.php index 04148e4e..f0365ec3 100644 --- a/src/Service/CacheService.php +++ b/src/Service/CacheService.php @@ -444,6 +444,8 @@ private function removeDataFromCache(Collection $collection, string $type, array $filter['_self.schema.id']['$in'][] = $schemaRef; } + $filter['_limit'] = $collection->count($filter); + $objects = $collection->find($filter, [])->toArray(); } else { $objects = $collection->find()->toArray();