-
Notifications
You must be signed in to change notification settings - Fork 135
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
feat(cloudflare-kv-binding): support ttl
for setItem
#470
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
barberj
force-pushed
the
cloudflare-kv-expiration_ttl
branch
10 times, most recently
from
August 2, 2024 14:44
81d4b54
to
5ee9bb0
Compare
barberj
force-pushed
the
cloudflare-kv-expiration_ttl
branch
3 times, most recently
from
August 2, 2024 14:58
96c8822
to
1024281
Compare
barberj
changed the title
Cloudflare KV Opts
feat: update cloudflare kv driver to set expiration when setting items
Aug 2, 2024
8 tasks
The value is stringify when passed to the storage driver. Parse it looking for an expires value. If expires value exists, set expirationTtl in Cloudflare KV store
- Add the event's expires key to the transcation options when calling setItem for use with the driver. - Update Cloudflare KV setItem to use TransactionOption's ttl for expirationTtl value when setting the key.
barberj
force-pushed
the
cloudflare-kv-expiration_ttl
branch
from
August 6, 2024 01:12
1024281
to
4138297
Compare
pi0
requested changes
Sep 4, 2024
pi0
changed the title
feat: update cloudflare kv driver to set expiration when setting items
feat(cloudflare-kv): infer Sep 4, 2024
expirationTtl
from ttl
option
pi0
changed the title
feat(cloudflare-kv): infer
feat(cloudflare-kv-binding): support Sep 4, 2024
expirationTtl
from ttl
optionttl
for setItem
pi0
approved these changes
Sep 4, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #470 +/- ##
==========================================
- Coverage 65.05% 57.94% -7.12%
==========================================
Files 39 38 -1
Lines 4055 3091 -964
Branches 487 514 +27
==========================================
- Hits 2638 1791 -847
+ Misses 1408 1291 -117
Partials 9 9 ☔ View full report in Codecov by Sentry. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Nitro calls
setItem
with key and an entry object. The entry object has keys value, integrity, mtime, and expires. Set ttl on TransactionOptions from value before calling the driver's setItem.resolves #32 & Nitro#2510