Skip to content

Commit

Permalink
TASK: Reintroduce content graph / cr read model cache
Browse files Browse the repository at this point in the history
With neos/neos-development-collection#5246 the cache was naively removed ^^
But with the additional complexity of fetching workspaces etc it makes sense to reintroduce this cache layer.
  • Loading branch information
mhsdesign committed Oct 1, 2024
1 parent 8ff3337 commit d57195d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/DoctrineDbalContentGraphProjection.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@
use Neos\ContentRepository\Core\Projection\ContentGraph\Timestamps;
use Neos\ContentRepository\Core\Projection\ProjectionInterface;
use Neos\ContentRepository\Core\Projection\ProjectionStatus;
use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface;
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateClassification;
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId;
use Neos\ContentRepository\Core\SharedModel\Node\NodeName;
Expand All @@ -78,7 +79,7 @@
* @implements ProjectionInterface<ContentRepositoryReadModel>
* @internal but the graph projection is api
*/
final class DoctrineDbalContentGraphProjection implements ProjectionInterface
final class DoctrineDbalContentGraphProjection implements ProjectionInterface, WithMarkStaleInterface
{
use ContentStream;
use NodeMove;
Expand Down Expand Up @@ -168,6 +169,12 @@ public function reset(): void

$this->checkpointStorage->acquireLock();
$this->checkpointStorage->updateAndReleaseLock(SequenceNumber::none());
$this->getState()->forgetInstances();
}

public function markStale(): void
{
$this->getState()->forgetInstances();
}

public function getCheckpointStorage(): DbalCheckpointStorage
Expand Down

0 comments on commit d57195d

Please sign in to comment.