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 fad7018 commit c0ce2ba
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/ContentRepositoryReadModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

use Neos\ContentRepository\Core\Projection\ContentGraph\ContentGraphInterface;
use Neos\ContentRepository\Core\Projection\ProjectionStateInterface;
use Neos\ContentRepository\Core\Projection\WithMarkStaleInterface;
use Neos\ContentRepository\Core\SharedModel\Exception\WorkspaceDoesNotExist;
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStream;
use Neos\ContentRepository\Core\SharedModel\Workspace\ContentStreamId;
Expand Down Expand Up @@ -57,11 +58,10 @@ public function __construct(
/**
* To release all held instances, in case a workspace/content stream relation needs to be reset
*
* @internal Should only be needed after write operations (which should take care on their own)
* @internal Must be invoked by the projection {@see WithMarkStaleInterface::markStale()} to ensure a flush after write operations
*/
public function forgetInstances(): void
{
// todo do we need to reintroduce the cache??? https://github.com/neos/neos-development-collection/pull/5246
$this->contentGraphInstancesByWorkspaceName = [];
$this->workspaceInstancesByName = [];
$this->contentStreamInstancesById = [];
Expand Down

0 comments on commit c0ce2ba

Please sign in to comment.