Skip to content

Commit

Permalink
fix(filecache): Move from array_merge to avoid memory exhaustion
Browse files Browse the repository at this point in the history
Signed-off-by: Git'Fellow <12234510+solracsf@users.noreply.github.com>
  • Loading branch information
solracsf committed Mar 4, 2024
1 parent a58ed05 commit 575159b
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/private/Files/Cache/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -585,8 +585,13 @@ private function removeChildren(ICacheEntry $entry) {
return $cacheEntry->getPath();
}, $children);

$deletedIds = array_merge($deletedIds, $childIds);
$deletedPaths = array_merge($deletedPaths, $childPaths);
foreach ($childIds as $childId) {
$deletedIds[] = $childId;
}

foreach ($childPaths as $childPath) {
$deletedPaths[] = $childPath;
}

$query = $this->getQueryBuilder();
$query->delete('filecache_extended')
Expand Down

0 comments on commit 575159b

Please sign in to comment.