Also, how does KV differ from a CDN (like CloudFront) caching JSON responses? Since both of the solu
Also, how does KV differ from a CDN (like CloudFront) caching JSON responses? Since both of the solutions go to the origin in case of a cache MISS
’s routing to get to core faster
refreshTtl parameter to .get that lets you set a lower consistency value. However, there's a bunch of stuff we have to do under the hood to support that.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.refreshTtl.getexpirationexpirationTtlexpirationTtlget(“someKey”, {expirationTtl: 1800});const value = await get("somKey")
ctx.waitUntil(put("somKey", value))