public function touch($key, $expire)
{
if (!$this->lock($key)) {
return false;
}
$value = $this->get($key);
if ($value === false) {
$this->unlock($key);
return false;
}
$path = $this->path($key);
$data = $this->wrap($value, $expire);
try {
$success = $this->filesystem->update($path, $data);
return $success && $this->unlock($key);
} catch (FileNotFoundException $e) {
$this->unlock($key);
return false;
}
}