/** * Tries to read the configuration from cache, if it's not cached loads it from file and caches it. * * @return array|object */ private function readFromCache() { if (($config = $this->cacheConfig->getCacheManager()->get($this->cacheConfig->getKey())) !== null) { return $config; } $config = $this->read(); $this->cacheConfig->getCacheManager()->set($this->cacheConfig->getKey(), $config, $this->cacheConfig->getTtl()); return $config; }
public function testGetKey() { $object = new CacheConfig($this->data); $this->assertNotEmpty($object->getKey()); }