Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 0 additions & 30 deletions Neos.Neos/Classes/Fusion/Helper/CachingHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
use Neos\ContentRepository\Core\NodeType\NodeTypeNames;
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
use Neos\ContentRepository\Core\SharedModel\Workspace\Workspace;
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId;
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\ProtectedContextAwareInterface;
Expand Down Expand Up @@ -162,35 +161,6 @@ public function descendantOfTag(iterable|Node $nodes): array
);
}

/**
* @param Node|null $node
* @return array<string,Workspace>
*/
public function getWorkspaceChain(?Node $node): array
Copy link
Member Author

@mhsdesign mhsdesign Nov 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this helper method is removed for the minor release 9.1 i think its okay as

a: it was just introduced with Neos 9.0 - not available in 8.3
b: the method is not documented and thus not as much api as say nodeTypeTag
and c: its absolutely useless for caching in Neos 9 thats why we remove it ourselves as well. So if anyone upgrading to 9.1 finds a reference to that in his cache config it can just be removed.

If you disagree ill have that removed for 10.0

{
if ($node === null) {
return [];
}

$contentRepository = $this->contentRepositoryRegistry->get(
$node->contentRepositoryId
);

$currentWorkspace = $contentRepository->findWorkspaceByName(
$node->workspaceName
);
$workspaceChain = [];
// TODO: Maybe write CTE here
while ($currentWorkspace !== null) {
$workspaceChain[$currentWorkspace->workspaceName->value] = $currentWorkspace;
$currentWorkspace = $currentWorkspace->baseWorkspaceName
? $contentRepository->findWorkspaceByName($currentWorkspace->baseWorkspaceName)
: null;
}

return $workspaceChain;
}

/**
* All methods are considered safe
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,5 @@
# Extension of the GlobalCacheIdentifiers prototype
#
# We add the names of workspaces of the current workspace chain (for example, "user-john,some-workspace,live") to the list
# of entry identifier pieces in order to make sure that a specific combination of workspaces has its own content cache entry.
#
prototype(Neos.Fusion:GlobalCacheIdentifiers) {
workspaceChain = ${Array.join(Array.keys(Neos.Caching.getWorkspaceChain(documentNode)), ',')}
[email protected] = ${!!documentNode}
renderingMode = ${renderingMode.name}
}
Loading