コード例 #1
0
ファイル: Adapter.php プロジェクト: nilportugues/cache
 /**
  * @param $key
  * @param $value
  * @param $ttl
  */
 protected function setChain($key, $value, $ttl)
 {
     InMemoryAdapter::getInstance()->set($key, $value, $ttl);
     if (null !== $this->nextAdapter) {
         $this->nextAdapter->set($key, $value, $ttl);
     }
 }
コード例 #2
0
ファイル: Cache.php プロジェクト: nilportugues/cache
 /**
  * @param string $key
  * @param int $value
  * @param null $ttl
  * @return $this
  */
 public function set($key, $value, $ttl = null)
 {
     $this->cache->set($this->namespace . $key, $value, $ttl);
     return $this;
 }