PHP Class Neos\ContentRepository\Domain\Service\Cache\FirstLevelNodeCache

The caching of multiple nodes below a certain path is possible as well, using the *ChildNodesByPathAndNodeTypeFilter() methods.
Datei anzeigen Open project: neos/neos-development-collection Class Usage Examples

Protected Properties

Property Type Description
$childNodesByPathAndNodeTypeFilter array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$nodesByIdentifier array<\Neos\ContentRepository\Domain\Model\NodeInterface>
$nodesByPath array<\Neos\ContentRepository\Domain\Model\NodeInterface>

Public Methods

Method Description
flush ( ) : void Flush the cache.
getByIdentifier ( string $identifier ) : Neos\ContentRepository\Domain\Model\NodeInterface | boolean If the cache contains a node with the given identifier, it is returned.
getByPath ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface If the cache contains a node for the given path, it is returned.
getChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter ) : boolean Returns the cached child nodes for the given path and node type filter.
setByIdentifier ( string $identifier, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void Adds the given node to the cache for the given identifier. The node will also be added with is's path.
setByPath ( string $path, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void Adds the given node to the cache for the given path. The node will also be added under it's identifier.
setChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter, array $nodes ) : void Sets the given nodes as child nodes for the given path and node type filter.

Method Details

flush() public method

Flush the cache.
public flush ( ) : void
return void

getByIdentifier() public method

Otherwise FALSE is returned.
public getByIdentifier ( string $identifier ) : Neos\ContentRepository\Domain\Model\NodeInterface | boolean
$identifier string
return Neos\ContentRepository\Domain\Model\NodeInterface | boolean

getByPath() public method

Otherwise FALSE is returned.
public getByPath ( string $path ) : Neos\ContentRepository\Domain\Model\NodeInterface
$path string
return Neos\ContentRepository\Domain\Model\NodeInterface

getChildNodesByPathAndNodeTypeFilter() public method

Returns the cached child nodes for the given path and node type filter.
public getChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter ) : boolean
$path string
$nodeTypeFilter string
return boolean

setByIdentifier() public method

Adds the given node to the cache for the given identifier. The node will also be added with is's path.
public setByIdentifier ( string $identifier, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void
$identifier string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void

setByPath() public method

Adds the given node to the cache for the given path. The node will also be added under it's identifier.
public setByPath ( string $path, Neos\ContentRepository\Domain\Model\NodeInterface $node = null ) : void
$path string
$node Neos\ContentRepository\Domain\Model\NodeInterface
return void

setChildNodesByPathAndNodeTypeFilter() public method

The nodes will each be added with their path and identifier as well.
public setChildNodesByPathAndNodeTypeFilter ( string $path, string $nodeTypeFilter, array $nodes ) : void
$path string
$nodeTypeFilter string
$nodes array
return void

Property Details

$childNodesByPathAndNodeTypeFilter protected_oe property

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $childNodesByPathAndNodeTypeFilter
return array<\Neos\ContentRepository\Domain\Model\NodeInterface>

$nodesByIdentifier protected_oe property

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $nodesByIdentifier
return array<\Neos\ContentRepository\Domain\Model\NodeInterface>

$nodesByPath protected_oe property

protected array<\Neos\ContentRepository\Domain\Model\NodeInterface> $nodesByPath
return array<\Neos\ContentRepository\Domain\Model\NodeInterface>