Ejemplo n.º 1
0
 /**
  * Sets a new caching value, but only if the value already exists
  *
  * @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 replace($key, $value, $expire = 0)
 {
     $this->inner->replace($this->prepareKey($key), $value, $expire);
     return $this;
 }
Ejemplo n.º 2
0
 /**
  * Sets a new caching value, but only if the value already exists
  *
  * @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\Group Returns a self reference
  */
 public function replace($key, $value, $expire = 0)
 {
     $this->cache->replace($this->modifyKey($key), $value, $expire);
     return $this;
 }
Ejemplo n.º 3
0
 /**
  * Sets a new caching value, but only if the value already exists
  *
  * @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 replace($key, $value, $expire = 0)
 {
     $this->primary->replace($key, $value, $expire);
     $this->secondary->replace($key, $value, $expire);
     return $this;
 }
Ejemplo n.º 4
0
 /**
  * Sets a new value, but only if the key already exists
  *
  * @param mixed $value The value to set
  * @param Integer $expire The lifespan of this cache value, in seconds
  * @return \r8\Cache\Value Returns a self reference
  */
 public function replace($value, $expire = 0)
 {
     $this->cache->replace($this->key, $value, $expire);
     return $this;
 }