-
-
Notifications
You must be signed in to change notification settings - Fork 17
Complete scheduler, cache and framework test parity updates #586
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
Changes from all commits
73123fa
d690bf2
29dfac3
52542ed
6efc859
36e0cd3
d87d1f6
e5d4657
49af02d
d5c4c92
9beb772
9818083
2bf271b
83a4cb1
9308ecb
6d8c245
3ad6b7c
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 |
|---|---|---|
|
|
@@ -206,24 +206,21 @@ public function putMany(array $values, DateInterval|DateTimeInterface|int|null $ | |
| } | ||
|
|
||
| /** | ||
| * Set the expiration of a cached item; null TTL will retain the item forever. | ||
| * Set the expiration of a cached item. | ||
| */ | ||
| public function touch(UnitEnum|string $key, DateInterval|DateTimeInterface|int|null $ttl = null): bool | ||
| public function touch(UnitEnum|string $key, DateInterval|DateTimeInterface|int $ttl): bool | ||
| { | ||
| $key = $key instanceof UnitEnum ? (string) enum_value($key) : $key; | ||
| $value = $this->getRaw($key); | ||
|
|
||
| if (is_null($value)) { | ||
| return false; | ||
| } | ||
| $seconds = $this->getSeconds($ttl); | ||
|
|
||
| if (is_null($ttl)) { | ||
| return $this->forever($key, $value); | ||
| if ($seconds <= 0) { | ||
| return $this->forget($key); | ||
|
Comment on lines
+217
to
+218
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.
When an all-mode Redis cache item is touched with a zero, negative, or past expiration, this branch calls the inherited
Member
Author
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 follows the existing all-mode deletion contract. A nonpositive The retained metadata does consume space until a tag flush or pruning pass. We’re keeping that shared cleanup model. Adding eager cleanup only to 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. That’s fair. Since |
||
| } | ||
|
|
||
| return $this->store->allTagOps()->touch()->execute( | ||
| $this->itemKey($key), | ||
| $this->getSeconds($ttl), | ||
| $seconds, | ||
| $this->tags->tagIds() | ||
| ); | ||
| } | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.