CachingHelper
class CachingHelper implements ProtectedContextAwareInterface (View source)
Caching helper to make cache tag generation easier.
Properties
protected ContentRepositoryRegistry | $contentRepositoryRegistry |
Methods
Render a caching configuration for array of Nodes
Generate a @cache
entry tag for a single node, array of nodes or a FlowQuery result
A cache entry with this tag will be flushed whenever one of the
given nodes (for any variant) is updated.
No description
Generate a @cache
entry tag for a single node identifier. If a Node $contextNode is given the
entry tag will respect the workspace hash.
Generate an @cache
entry tag for a node type
A cache entry with this tag will be flushed whenever a node
(for any variant) that is of the given node type(s)
(including inheritance) is updated.
No description
Generate a @cache
entry tag for descendants of a node, an array of nodes or a FlowQuery result
A cache entry with this tag will be flushed whenever a node
(for any variant) that is a descendant (child on any level) of one of
the given nodes is updated.
No description
All methods are considered safe
Details
protected array
convertArrayOfNodesToArrayOfNodeIdentifiersWithPrefix(mixed $nodes, string $prefix)
Render a caching configuration for array of Nodes
array
nodeTag(mixed $nodes)
Generate a @cache
entry tag for a single node, array of nodes or a FlowQuery result
A cache entry with this tag will be flushed whenever one of the
given nodes (for any variant) is updated.
NodeCacheEntryIdentifier
entryIdentifierForNode(Node $node)
No description
string
nodeTagForIdentifier(string $identifier, Node $contextNode = null)
Generate a @cache
entry tag for a single node identifier. If a Node $contextNode is given the
entry tag will respect the workspace hash.
string|string[]
nodeTypeTag(string|NodeType|string[]|NodeType[]|Traversable<string>|NodeType> $nodeType, Node $contextNode = null)
Generate an @cache
entry tag for a node type
A cache entry with this tag will be flushed whenever a node
(for any variant) that is of the given node type(s)
(including inheritance) is updated.
protected string
getNodeTypeTagFor(string|NodeType $nodeType, Node $contextNode = null)
No description
array
descendantOfTag(mixed $nodes)
Generate a @cache
entry tag for descendants of a node, an array of nodes or a FlowQuery result
A cache entry with this tag will be flushed whenever a node
(for any variant) that is a descendant (child on any level) of one of
the given nodes is updated.
array
getWorkspaceChain(Node|null $node)
No description
bool
allowsCallOfMethod(string $methodName)
All methods are considered safe