final class ParentNodeIdByChildNodeIdCache (View source)

internal  
 

NOTE: we do NOT directly cache the Parent Node; but only the Parent Node ID; as then, the NodeByNodeIdCache can be used properly

  • thus it might increase the cache hit rate to split this apart.

Properties

protected NodeAggregateId> $parentNodeAggregateIds
protected array<string, bool> $nodesWithoutParentNode

Methods

void
add(NodeAggregateId $childNodeAggregateId, NodeAggregateId $parentNodeAggregateId)

No description

bool
knowsAbout(NodeAggregateId $childNodeAggregateId)

No description

void
rememberNonExistingParentNode(NodeAggregateId $nodeAggregateId)

No description

get(NodeAggregateId $childNodeAggregateId)

No description

Details

void add(NodeAggregateId $childNodeAggregateId, NodeAggregateId $parentNodeAggregateId)

No description

Parameters

NodeAggregateId $childNodeAggregateId
NodeAggregateId $parentNodeAggregateId

Return Value

void

bool knowsAbout(NodeAggregateId $childNodeAggregateId)

No description

Parameters

NodeAggregateId $childNodeAggregateId

Return Value

bool

void rememberNonExistingParentNode(NodeAggregateId $nodeAggregateId)

No description

Parameters

NodeAggregateId $nodeAggregateId

Return Value

void

NodeAggregateId|null get(NodeAggregateId $childNodeAggregateId)

No description

Parameters

NodeAggregateId $childNodeAggregateId

Return Value

NodeAggregateId|null