ContentCacheFlusher
class ContentCacheFlusher (View source)
This service flushes Fusion content caches triggered by node changes.
The method registerNodeChange() is triggered by a signal which is configured in the Package class of the Neos.Neos package (this package). Information on changed nodes is collected by this method and the respective Fusion content cache entries are flushed in one operation during Flow's shutdown procedure.
Properties
protected ContentCache | $contentCache | ||
protected LoggerInterface | $systemLogger | ||
protected array | $tagsToFlush | ||
protected CachingHelper | $cachingHelper | ||
protected WorkspaceRepository | $workspaceRepository | ||
protected array | $workspacesToFlush | ||
protected AssetService | $assetService | ||
protected NodeTypeManager | $nodeTypeManager | ||
protected ContentContextFactory | $contextFactory | ||
protected PersistenceManagerInterface | $persistenceManager | ||
protected ContentContext[] | $contexts | ||
protected Context | $securityContext |
Methods
Register a node change for a later cache flush. This method is triggered by a signal sent via ContentRepository's Node model or the Neos Publishing Service.
Pleas use registerNodeChange() if possible. This method is a low-level api. If you do use this method make sure that $cacheIdentifier contains the workspacehash as well as the node identifier: $workspaceHash .'_'. $nodeIdentifier The workspacehash can be received via $this->getCachingHelper()->renderWorkspaceTagForContextNode($workpsacename)
This is a low-level api. Please use registerNodeChange() if possible. Otherwise make sure that $nodeTypePrefix is set up correctly and contains the workspacehash wich can be received via $this->getCachingHelper()->renderWorkspaceTagForContextNode($workpsacename)
Fetches possible usages of the asset and registers nodes that use the asset as changed.
Flush caches according to the previously registered node changes.
No description
Details
void
registerNodeChange(NodeInterface $node, Workspace $targetWorkspace = null)
Register a node change for a later cache flush. This method is triggered by a signal sent via ContentRepository's Node model or the Neos Publishing Service.
protected void
registerAllTagsToFlushForNodeInWorkspace(NodeInterface $node, Workspace $workspace)
No description
protected void
resolveWorkspaceChain(Workspace $workspace)
No description
protected void
resolveTagsForChildWorkspaces(Workspace $workspace, string $startingPoint)
No description
registerChangeOnNodeIdentifier(string $cacheIdentifier)
Pleas use registerNodeChange() if possible. This method is a low-level api. If you do use this method make sure that $cacheIdentifier contains the workspacehash as well as the node identifier: $workspaceHash .'_'. $nodeIdentifier The workspacehash can be received via $this->getCachingHelper()->renderWorkspaceTagForContextNode($workpsacename)
registerChangeOnNodeType(string $nodeTypeName, string $referenceNodeIdentifier = null, string $nodeTypePrefix = '')
This is a low-level api. Please use registerNodeChange() if possible. Otherwise make sure that $nodeTypePrefix is set up correctly and contains the workspacehash wich can be received via $this->getCachingHelper()->renderWorkspaceTagForContextNode($workpsacename)
void
registerAssetChange(AssetInterface $asset)
Fetches possible usages of the asset and registers nodes that use the asset as changed.
void
shutdownObject()
Flush caches according to the previously registered node changes.
protected ContentContext
getContextForReference(AssetUsageInNodeProperties $assetUsage)
No description
protected string[]
getAllImplementedNodeTypeNames(NodeType $nodeType)
No description
protected CachingHelper
getCachingHelper()
No description