MatthiasMullie\Scrapbook\KeyValueStore::replace PHP 메소드

replace() 공개 메소드

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
리턴 boolean
    public function replace($key, $value, $expire = 0);

Usage Example

예제 #1
0
 /**
  * {@inheritdoc}
  */
 public function replace($key, $value, $expire = 0)
 {
     return $this->cache->replace($key, $value, $expire);
 }