-
Notifications
You must be signed in to change notification settings - Fork 30
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
Deno.KV expireIn time #79
Comments
Expiry happens some time after the set time, but not necessarily immediately after that time. This is documented in the docs: https://deno.land/[email protected]?s=Deno.Kv#method_set_0
|
I also had a bug due to this, because I missed this caveat, but I found it eventually. The way it's specified now, an implementation might never expire a key and would still be compliant. The caveat now recommends to implement your own expiry mechanism if you can't afford stale data, which isn't really ergonomic IMO. I imagine that many KV users who look for the expiration feature also want their keys to be expired. Three related ideas:
|
lol |
Either there's a bug, or I don't understand how {expireIn} works or the documentation is not right.
I'm doing:
In this code, I'm expecting the key/value to expire and return null after 4 seconds (4000 milliseconds).
However, the get() function continues to work.
It eventually does expire, but not in 4 seconds or 4000 seconds. Is this a bug?
The text was updated successfully, but these errors were encountered: