Any plans to add a way to reset expiration when getting a value?
Any plans to add a way to reset expiration when getting a value?
expiration/expirationTtl to a get() call, so you could have, as an example, a key that expires 30 minutes after the last readget(“someKey”, {expirationTtl: 1800});. And it seems like overkill to have to rewrite a key every time to reset the expiration timer…expirationTtl, that defeats the purpose since you need to hit the storage. And what happens if we fail to update the TTL is that an error? If yes, then we'd have to wait for the response from the storage & it's not cacheable. It would have to be no which means there's no way to signal to the user that we failed to update the TTL.

expirationexpirationTtlexpirationTtlget()get(“someKey”, {expirationTtl: 1800});const value = await get("somKey")
ctx.waitUntil(put("somKey", value))