/**
* {@inheritDoc}
*/
public function getWeakReferences($path, $name = null)
{
if (empty($this->caches['nodes'])) {
return parent::getWeakReferences($path, $name);
}
$cacheKey = "nodes weak references: {$path}, {$name}, " . $this->workspaceName;
$cacheKey = $this->sanitizeKey($cacheKey);
if ($result = $this->caches['nodes']->fetch($cacheKey)) {
return $result;
}
$references = parent::getWeakReferences($path, $name);
$this->caches['nodes']->save($cacheKey, $references);
return $references;
}