hey everyone, is KV durable? can I rest assured stored content will persist indefinitely?
hey everyone, is KV durable? can I rest assured stored content will persist indefinitely?
KV.list() operation is billed based on the number of keys returned that match the prefix filter, not the total number of keys in the namespace.prefix is handled internally by Cloudflare, so the operation scans only the relevant part of the namespace that matches the specified prefix.list() counts as a single read operation, regardless of the number of keys returned.value.keys array. If the list() operation retrieves 10 keys, it will count as 10 read operations.NAMESPACE.list({ prefix: "user:1:" }) returns 50 keys.list() method).prefix. The filtering happens on Cloudflare's side, and only matching keys are returned and billed.list() operation, not for scanning the entire namespace.
nullexpirationTtl: 21600 do I also need to use cacheTtl?expirationTtl: 21600 so I know that even if something goes wrong it will expire in 6 hours. await env.NAMESPACE.put(key, value, {
expiration: secondsSinceEpoch,
});
await env.NAMESPACE.put(key, value);const [key, value] = ["something", "whatever"]
binding.put(key, value, { expirationTtl: 21600 })
Then after 5 minutes I do:
binding.get(key, {cacheTtl:21600})
Then after 5 minutes I do:
binding.delete(key)
Then after 5 minutes I do:
binding.get(key, {cacheTtl:21600})
Will this last one return null or the cached value?