Stoke
Stoke
CDCloudflare Developers
Created by Stoke on 7/29/2024 in #kv
KV vs DO for link shortening
The reason is that it's not quite an URL shortener. Reads at the source are somewhat expensive, so they need to be minimized/cached. Writes are very infrequent, but when they happen, they need to be visible soon (around 60s, maybe a little bit longer). In other words, the TTL for the read cache should be higher than what is acceptable for the visibilty of updates. I know that this is solvable by a two-tier caching system, but of course that increases the overall system complexity. Less moving parts is better, so I was hoping that KV has a way to cache bust or sync in the background within a period that's acceptable for this use case
3 replies