MatthiasMullie\Scrapbook\Buffered\Utils\Transaction::touch PHP Метод

touch() публичный Метод

public touch ( $key, $expire )
    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;
    }

Usage Example

Пример #1
0
 /**
  * {@inheritdoc}
  */
 public function touch($key, $expire)
 {
     $result = $this->transaction->touch($key, $expire);
     $this->transaction->commit();
     return $result;
 }