Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions src/Illuminate/Cache/SessionStore.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,24 @@
return "{$this->key}.{$key}";
}

/**
* Adjust the expiration time of a cached item.
*
* @param string $key
* @param int $seconds
* @return bool
*/
public function touch($key, $seconds)
{
if (! $this->session->exists($this->itemKey($key))) {
return;
}

$item = $this->session->get($this->itemKey($key));

return $this->put($key, $item['value'], (int) max(1, $seconds));
}

/**
* Get the cache key prefix.
*
Expand All @@ -203,4 +221,4 @@
{
return '';
}
}

Check failure on line 224 in src/Illuminate/Cache/SessionStore.php

View workflow job for this annotation

GitHub Actions / Source Code

Cannot redeclare method Illuminate\Cache\SessionStore::touch().
Loading