replace() public method

This operation fails (returns false) if the key does not yet exist in cache. If the operation succeeds, true will be returned.
public replace ( string $key, mixed $value, integer $expire ) : boolean
$key string
$value mixed
$expire integer Time when item falls out of the cache: 0 = permanent (doesn't expires); under 2592000 (30 days) = relative time, in seconds from now; over 2592000 = absolute time, unix timestamp
return boolean
Esempio n. 1
0
 /**
  * {@inheritdoc}
  */
 public function replace($key, $value, $expire = 0)
 {
     return $this->cache->replace($key, $value, $expire);
 }