Skip to content

Commit

Permalink
TASK: Move NodeCacheEntryIdentifier to Fusion namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
mhsdesign committed May 26, 2024
1 parent b6787ba commit 0db90e3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

declare(strict_types=1);

namespace Neos\Neos\Domain\Model;
namespace Neos\Neos\Fusion\Cache;

use Neos\Flow\Annotations as Flow;
use Neos\Cache\CacheAwareInterface;
Expand Down
10 changes: 9 additions & 1 deletion Neos.Neos/Classes/Fusion/Helper/CachingHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
use Neos\ContentRepositoryRegistry\ContentRepositoryRegistry;
use Neos\Eel\ProtectedContextAwareInterface;
use Neos\Flow\Annotations as Flow;
use Neos\Neos\Domain\Model\NodeCacheEntryIdentifier;
use Neos\Neos\Fusion\Cache\NodeCacheEntryIdentifier;
use Neos\Neos\Fusion\Cache\CacheTag;
use Neos\Neos\Fusion\Cache\CacheTagSet;

Expand Down Expand Up @@ -56,6 +56,14 @@ public function nodeTag(iterable|Node $nodes): array
return CacheTagSet::forNodeAggregatesFromNodes(Nodes::fromArray($nodes))->toStringArray();
}

/**
* Generate a `@cache` entry identifier for a given node:
*
* entryIdentifier {
* documentNode = ${Neos.Caching.entryIdentifierForNode(documentNode)}
* }
*
*/
public function entryIdentifierForNode(Node $node): NodeCacheEntryIdentifier
{
return NodeCacheEntryIdentifier::fromNode($node);
Expand Down

0 comments on commit 0db90e3

Please sign in to comment.