Skip to content

Commit 898e07e

Browse files
authored
Merge pull request #5674 from mhsdesign/task/cleanup-GlobalCacheIdentifiers-by-removing-obsolete-workspaceChain
TASK: Cleanup `Neos.Fusion:GlobalCacheIdentifiers` by removing `workspaceChain`
2 parents e2c5a5b + c8f2e93 commit 898e07e

File tree

2 files changed

+0
-35
lines changed

2 files changed

+0
-35
lines changed

Neos.Neos/Classes/Fusion/Helper/CachingHelper.php

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
use Neos\ContentRepository\Core\NodeType\NodeTypeNames;
1818
use Neos\ContentRepository\Core\Projection\ContentGraph\Node;
1919
use Neos\ContentRepository\Core\Projection\ContentGraph\Nodes;
20-
use Neos\ContentRepository\Core\SharedModel\Workspace\Workspace;
2120
use Neos\ContentRepository\Core\SharedModel\Node\NodeAggregateId;
2221
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
2322
use Neos\Eel\ProtectedContextAwareInterface;
@@ -162,35 +161,6 @@ public function descendantOfTag(iterable|Node $nodes): array
162161
);
163162
}
164163

165-
/**
166-
* @param Node|null $node
167-
* @return array<string,Workspace>
168-
*/
169-
public function getWorkspaceChain(?Node $node): array
170-
{
171-
if ($node === null) {
172-
return [];
173-
}
174-
175-
$contentRepository = $this->contentRepositoryRegistry->get(
176-
$node->contentRepositoryId
177-
);
178-
179-
$currentWorkspace = $contentRepository->findWorkspaceByName(
180-
$node->workspaceName
181-
);
182-
$workspaceChain = [];
183-
// TODO: Maybe write CTE here
184-
while ($currentWorkspace !== null) {
185-
$workspaceChain[$currentWorkspace->workspaceName->value] = $currentWorkspace;
186-
$currentWorkspace = $currentWorkspace->baseWorkspaceName
187-
? $contentRepository->findWorkspaceByName($currentWorkspace->baseWorkspaceName)
188-
: null;
189-
}
190-
191-
return $workspaceChain;
192-
}
193-
194164
/**
195165
* All methods are considered safe
196166
*
Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,5 @@
11
# Extension of the GlobalCacheIdentifiers prototype
22
#
3-
# We add the names of workspaces of the current workspace chain (for example, "user-john,some-workspace,live") to the list
4-
# of entry identifier pieces in order to make sure that a specific combination of workspaces has its own content cache entry.
5-
#
63
prototype(Neos.Fusion:GlobalCacheIdentifiers) {
7-
workspaceChain = ${Array.join(Array.keys(Neos.Caching.getWorkspaceChain(documentNode)), ',')}
8-
[email protected] = ${!!documentNode}
94
renderingMode = ${renderingMode.name}
105
}

0 commit comments

Comments
 (0)