CachingHelper
class CachingHelper implements ProtectedContextAwareInterface (View source)
Caching helper to make cache tag generation easier.
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.
Generate a @cache
entry tag for a single node identifier. If a NodeInterface $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.
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.
string
nodeTagForIdentifier(string $identifier, NodeInterface $contextNode = null)
Generate a @cache
entry tag for a single node identifier. If a NodeInterface $contextNode is given the
entry tag will respect the workspace hash.
string|string[]
nodeTypeTag(string|NodeType|string[]|NodeType[] $nodeType, NodeInterface|null $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, $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.
string
renderWorkspaceTagForContextNode(string $workspaceName)
No description
bool
allowsCallOfMethod(string $methodName)
All methods are considered safe