Exemplo n.º 1
0
 /**
  * Sets a new caching value, but only if that value doesn't exist
  *
  * @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 add($key, $value, $expire = 0)
 {
     $this->inner->add($this->prepareKey($key), $value, $expire);
     return $this;
 }
Exemplo n.º 2
0
 /**
  * Sets a new caching value, but only if that value doesn't exist
  *
  * @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 add($key, $value, $expire = 0)
 {
     $this->cache->add($this->modifyKey($key), $value, $expire);
     return $this;
 }
Exemplo n.º 3
0
 /**
  * Sets a new caching value, but only if that value doesn't exist
  *
  * @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 add($key, $value, $expire = 0)
 {
     $this->primary->add($key, $value, $expire);
     $this->secondary->add($key, $value, $expire);
     return $this;
 }
Exemplo n.º 4
0
 /**
  * Sets a new value, but only if this key doesn't exist in the cache
  *
  * @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 add($value, $expire = 0)
 {
     $this->cache->add($this->key, $value, $expire);
     return $this;
 }