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