touch() public method

public touch ( string $key, integer $expire )
$key string
$expire integer
Example #1
0
 /**
  * {@inheritdoc}
  */
 public function touch($key, $expire)
 {
     // grab existing value (from real cache or memory) and re-save (to
     // memory) with updated expiration time
     $value = $this->get($key);
     if ($value === false) {
         return false;
     }
     $success = $this->local->set($key, $value, $expire);
     if ($success === false) {
         return false;
     }
     $this->defer->touch($key, $expire);
     return true;
 }