protected function getFromCache()
 {
     if (!$this->config->usecache) {
         return '';
     }
     return $this->cache->get($this->getCacheKey());
 }
Ejemplo n.º 2
0
 public function test_set_get_notzipped()
 {
     $config = $this->getConfig();
     $config->usezip = false;
     $cache = new imdb_cache($config, new imdb_logger());
     $setOk = $cache->set('test2', 'a value');
     $this->assertTrue($setOk);
     $getValue = $cache->get('test2');
     $this->assertEquals('a value', $getValue);
 }
 public function test_set_get_notzipped()
 {
     $config = new mdb_config();
     $config->usezip = false;
     $config->cachedir = realpath(dirname(__FILE__) . '/cache') . '/';
     $cache = new imdb_cache($config, new imdb_logger());
     $setOk = $cache->set('test2', 'a value');
     $this->assertTrue($setOk);
     $getValue = $cache->get('test2');
     $this->assertEquals('a value', $getValue);
 }
Ejemplo n.º 4
0
 protected function getFromCache()
 {
     return $this->cache->get($this->getCacheKey());
 }