store() public method

public store ( $data, CacheKey $k, $lifetime )
$k Cachearium\CacheKey
示例#1
0
 /**
  * (non-PHPdoc)
  * @see \Cachearium\Backend\CacheRAM::store()
  */
 public function store($data, CacheKey $k, $lifetime = 0)
 {
     // @codeCoverageIgnoreStart
     if (!$this->enabled) {
         return false;
     }
     // @codeCoverageIgnoreEnd
     $group = $this->hashKey($k);
     $this->log(CacheLogEnum::SAVED, $k);
     $x = $this->memcached->set($group, serialize($data), $lifetime ? $lifetime : $this->lifetime);
     parent::store($data, $k, $lifetime);
     return $x;
 }