-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
Description
In Deno KV, when using the set method, we can set an expiration time for a key via the expireIn option. However, I'm not sure how to update or extend the expiration time of an existing key.
For example, I have the following code to set a key with an expiration time:
import { openKv } from "deno/kv";
async function main() {
const kv = await openKv();
// Set a key with an expiration time of 60 seconds
await kv.set(["myKey"], "myValue", { expireIn: 60000 });
}After some time, I want to extend the expiration time of myKey by another 60 seconds. But I didn't find a direct method to achieve this in the API documentation.
Questions
Is there a built - in method to update or extend the expiration time of an existing key in Deno KV?
If there is no built - in method, what is the recommended workaround to achieve this functionality?
Metadata
Metadata
Assignees
Labels
No labels