You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At the moment KV cache is set and deleted the same way as R2. That is to say, the deletion cron will loop over all available keys and delete the ones past the expiration time configured on the project.
This is not very cost effective for KV, as list operations are billed at $5/million. While in R2 we don't have much of a choice here, in KV we can effectively use the expiry option to avoid the cost of manually looping and deleting expired keys.
Proposed Solution
I'm not 100% clear on how I would solve this, since it involves breaking the storage layer abstraction we've defined in this project since v3. My current thoughts are
It might be ok to break the abstraction to solve the cost issue
Perhaps the storage interface can expose some mechanism that abstracts the concept of expiry in a way that works for both R2 and KV (plus any future storage solutions)
The text was updated successfully, but these errors were encountered:
Problem Description
At the moment KV cache is set and deleted the same way as R2. That is to say, the deletion cron will loop over all available keys and delete the ones past the expiration time configured on the project.
This is not very cost effective for KV, as
list
operations are billed at $5/million. While in R2 we don't have much of a choice here, in KV we can effectively use the expiry option to avoid the cost of manually looping and deleting expired keys.Proposed Solution
I'm not 100% clear on how I would solve this, since it involves breaking the storage layer abstraction we've defined in this project since v3. My current thoughts are
The text was updated successfully, but these errors were encountered: