protected function generateCacheTags($node)
    {
        $this->tagsToFlush[ContentCache::TAG_EVERYTHING] = 'which were tagged with "Everything".';

        if (empty($this->workspacesToFlush[$node->getWorkspace()->getName()])) {
            $this->resolveWorkspaceChain($node->getWorkspace());
        }
        if (!array_key_exists($node->getWorkspace()->getName(), $this->workspacesToFlush)) {
            return;
        }
        $nodeIdentifier = $node->getIdentifier();
        foreach ($this->workspacesToFlush[$node->getWorkspace()->getName()] as $workspaceName => $workspaceHash) {
            $this->generateCacheTagsForNodeIdentifier($workspaceHash .'_'. $nodeIdentifier);
            $this->generateCacheTagsForNodeType($node->getNodeType()->getName(), $nodeIdentifier, $workspaceHash);
            $nodeInWorkspace = $node;
            while ($nodeInWorkspace->getDepth() > 1) {
                $nodeInWorkspace = $nodeInWorkspace->getParent();
                // Workaround for issue #56566 in Neos.ContentRepository
                if ($nodeInWorkspace === null) {
                    break;
                }
                $tagName = 'DescendantOf_' . $workspaceHash . '_' . $nodeInWorkspace->getIdentifier();
                $this->tagsToFlush[$tagName] = sprintf('which were tagged with "%s" because node "%s" has changed.', $tagName, $node->getPath());
            }
        }

        if ($node instanceof NodeInterface && $node->getContext() instanceof ContentContext) {
            /** @var Site $site */
            $site = $node->getContext()->getCurrentSite();
            if ($site->hasActiveDomains()) {
                $domains = $site->getActiveDomains()->map(function (Domain $domain) {
                    return $domain->getHostname();
                })->toArray();
                $this->domainsToFlush = array_unique(array_merge($this->domainsToFlush, $domains));
            }
        }
    }
protected function generateCacheTags($node)
    {
        $this->tagsToFlush[ContentCache::TAG_EVERYTHING] = 'which were tagged with "Everything".';

        if (empty($this->workspacesToFlush[$node->getWorkspace()->getName()])) {
            $this->resolveWorkspaceChain($node->getWorkspace());
        }
        if (!array_key_exists($node->getWorkspace()->getName(), $this->workspacesToFlush)) {
            return;
        }
        $nodeIdentifier = $node->getIdentifier();
        foreach ($this->workspacesToFlush[$node->getWorkspace()->getName()] as $workspaceName => $workspaceHash) {
            $this->generateCacheTagsForNodeIdentifier($workspaceHash .'_'. $nodeIdentifier);
            $this->generateCacheTagsForNodeType($node->getNodeType()->getName(), $nodeIdentifier, $workspaceHash);
            $nodeInWorkspace = $node;
            while ($nodeInWorkspace->getDepth() > 1) {
                $nodeInWorkspace = $nodeInWorkspace->getParent();
                // Workaround for issue #56566 in Neos.ContentRepository
                if ($nodeInWorkspace === null) {
                    break;
                }
                $tagName = 'DescendantOf_' . $workspaceHash . '_' . $nodeInWorkspace->getIdentifier();
                $this->tagsToFlush[$tagName] = sprintf('which were tagged with "%s" because node "%s" has changed.', $tagName, $node->getPath());
            }
        }

        if ($node instanceof NodeInterface && $node->getContext() instanceof ContentContext) {
            /** @var Site $site */
            $site = $node->getContext()->getCurrentSite();
            if ($site->hasActiveDomains()) {
                $domains = $site->getActiveDomains()->map(function (Domain $domain) {
                    return $domain->getHostname();
                })->toArray();
                $this->domainsToFlush = array_unique(array_merge($this->domainsToFlush, $domains));
            }
        }
    }
protected function generateCacheTags ( $ node ) { $ this -> tagsToFlush [ ContentCache :: TAG_EVERYTHING ] = 'which were tagged with "Everything".' ; if ( empty ( $ this -> workspacesToFlush [ $ node -> getWorkspace ( ) -> getName ( ) ] ) ) { $ this -> resolveWorkspaceChain ( $ node -> getWorkspace ( ) ) ; } if ( ! array_key_exists ( $ node -> getWorkspace ( ) -> getName ( ) , $ this -> workspacesToFlush ) ) { return ; } $ nodeIdentifier = $ node -> getIdentifier ( ) ; foreach ( $ this -> workspacesToFlush [ $ node -> getWorkspace ( ) -> getName ( ) ] as $ workspaceName => $ workspaceHash ) { $ this -> generateCacheTagsForNodeIdentifier ( $ workspaceHash . '_' . $ nodeIdentifier ) ; $ this -> generateCacheTagsForNodeType ( $ node -> getNodeType ( ) -> getName ( ) , $ nodeIdentifier , $ workspaceHash ) ; $ nodeInWorkspace = $ node ; while ( $ nodeInWorkspace -> getDepth ( ) > 1 ) { $ nodeInWorkspace = $ nodeInWorkspace -> getParent ( ) ; // Workaround for issue #56566 in Neos.ContentRepository if ( $ nodeInWorkspace === null ) { break ; } $ tagName = 'DescendantOf_' . $ workspaceHash . '_' . $ nodeInWorkspace -> getIdentifier ( ) ; $ this -> tagsToFlush [ $ tagName ] = sprintf ( 'which were tagged with "%s" because node "%s" has changed.' , $ tagName , $ node -> getPath ( ) ) ; } } if ( $ node instanceof NodeInterface && $ node -> getContext ( ) instanceof ContentContext ) { /** @var Site $site */ $ site = $ node -> getContext ( ) -> getCurrentSite ( ) ; if ( $ site -> hasActiveDomains ( ) ) { $ domains = $ site -> getActiveDomains ( ) -> map ( function ( Domain $ domain ) { return $ domain -> getHostname ( ) ; } ) -> toArray ( ) ; $ this -> domainsToFlush = array_unique ( array_merge ( $ this -> domainsToFlush , $ domains ) ) ; } } }
Generates cache tags to be flushed for a node which is flushed on shutdown.

Code duplicated from Neos' ContentCacheFlusher class

@param NodeInterface|NodeData $node The node which has changed in some way
@return void
@throws \Neos\ContentRepository\Exception\NodeTypeNotFoundException
Generates cache tags to be flushed for a node which is flushed on shutdown .