Skip to content

Commit

Permalink
Merge pull request #5420 from dlubitz/feature/signal-when-tags-got-fl…
Browse files Browse the repository at this point in the history
…ushed

FEATURE: Introduce signal when cache entry tags have been flushed.
  • Loading branch information
dlubitz authored Jan 14, 2025
2 parents 278a8b7 + e02eb1c commit 36465ba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Neos.Neos/Classes/Fusion/Cache/ContentCacheFlusher.php
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ protected function flushTagsImmediately(array $tagsToFlush): void
$affectedEntries = $this->contentCache->flushByTags(array_keys($tagsToFlush));
$this->systemLogger->debug(sprintf('Content cache: Removed %s entries', $affectedEntries));
}
$this->emitTagsFlushed($tagsToFlush);
}

/**
Expand Down Expand Up @@ -270,4 +271,15 @@ public function shutdownObject(): void
{
$this->flushCollectedTags();
}

/**
* Signal that is triggered whenever cache tags get flushed
*
* @Flow\Signal
* @param array<string, string> $tagsToFlush
* @return void
*/
protected function emitTagsFlushed(array $tagsToFlush): void
{
}
}

0 comments on commit 36465ba

Please sign in to comment.