/** * Sets a new caching value, overwriting any existing values * * @param String $key The key for the value * @param mixed $value The value to set * @param Integer $expire The lifespan of this cache value, in seconds * @return \r8\Cache\Suffix Returns a self reference */ public function set($key, $value, $expire = 0) { $this->inner->set($this->prepareKey($key), $value, $expire); return $this; }
/** * Deletes all values in the cache * * @return \r8\Cache\Group Returns a self reference */ public function flush() { $this->groupValue = base_convert(uniqid(dechex(mt_rand(0, 99999))), 16, 36); $this->cache->set($this->group . "_GroupValue", $this->groupValue, 0); return $this; }
/** * Sets a new caching value, overwriting any existing values * * @param String $key The key for the value * @param mixed $value The value to set * @param Integer $expire The lifespan of this cache value, in seconds * @return \r8\Cache\Layered Returns a self reference */ public function set($key, $value, $expire = 0) { $this->primary->set($key, $value, $expire); $this->secondary->set($key, $value, $expire); return $this; }
/** * Sets the value for this key in the cache * * @param mixed $value The new value * @param Integer $expire The lifespan of this cache value, in seconds * @return \r8\Cache\Result Returns a self reference */ public function set($value, $expire = 0) { $this->cache->set($this->key, $value, $expire); return $this; }