cache)) { return null; } if (isset($this->fetcher)) { $fetcherKey = $this->fetcher->getCacheKey(); } else { $fetcherKey = $this->getCacheKey(); } if (is_null($fetcherKey)) { return null; } $key = $this->cacheConfig['prefix'] . $fetcherKey; return $this->cache->get($key, $this->cacheConfig['lifetime']); } /** * Saves the value in the cache when that is available. */ private function setCachedValue($v) { if (is_null($this->cache)) { return; } if (isset($this->fetcher)) { $fetcherKey = $this->fetcher->getCacheKey(); } else { $fetcherKey = $this->getCacheKey(); } if (is_null($fetcherKey)) { return; } $key = $this->cacheConfig['prefix'] . $fetcherKey; $this->cache->set($key, $v); } }