-
Notifications
You must be signed in to change notification settings - Fork 11.4k
[master] Add Cache::touch()
& Store::touch()
for TTL Extension
#55954
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -83,6 +83,11 @@ public function forget($key); | |
*/ | ||
public function flush(); | ||
|
||
/** | ||
* Set the expiration of a cached item. | ||
*/ | ||
public function touch(string $key, int $ttl): bool; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a method to a public interface is a major breaking change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is targetting There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It can be removed from the I'm open to whatever y'all think, of course. |
||
|
||
/** | ||
* Get the cache key prefix. | ||
* | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding a method to a public interface is a major breaking change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is targetting
master
now, should be fine.Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In theory, I could drop the notation from the
Cache
facade and the method from theRepository
interface, but would still need to do something likemethod_exists
and return false or throw an exception that the driver doesn't supporttouch()
if we dropped it from theStore
interface. That would allow it to target12.x
, but not sure that's necessarily better than targeting master.I'm open to whatever y'all think, of course.