Exemplo n.º 1
0
 public function addCache(Cache $cache)
 {
     $backend = $cache->getBackend();
     if (!$backend instanceof LoggingBackend) {
         $backend = new LoggingBackend($backend, $this->logger);
     }
     $cache->setBackend($backend);
     $this->addLogger($backend->getLogger());
 }
Exemplo n.º 2
0
 public function testId()
 {
     $this->assertEquals('foo', $this->cache->id('foo'));
     $this->assertEquals('foo:bar', $this->cache->id('foo', 'bar'));
     Cache::$namespaceSeparator = '-';
     $this->assertEquals('foo-bar', $this->cache->id('foo', 'bar'));
     Cache::$namespaceSeparator = ':';
 }
 /**
  * @param  array      $model
  * @return mixed|void
  */
 public function setModel($model)
 {
     $this->model = $model;
     $this->cache->set($this->modelName, $model);
 }