I'm using KV to cache browser screenshots as described in this doc: https://developers.cloudflare.co
I'm using KV to cache browser screenshots as described in this doc: https://developers.cloudflare.com/browser-rendering/get-started/screenshots/
In that doc, the
expirationTtl
for the screenshots in KV is being set to 24 hours. My ideal would be to make the expiry much longer (e.g. 1 month), but with an implementation like an LRU cache where the TTL would reset whenever the value is read, so that only keys that haven’t been read for 1 month are evicted. Is there a way to accomplish something like that with KV, or is there another product that would be better suited for that kind of implementation? I did a search in discord and found this message, which suggests that KV’s expiration TTL isn’t the way to achieve this, but then because reading a value with a cacheTtl
parameter resets any previous cacheTtl from a previous read, I thought there could be something there.0 Replies