Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an estimate API for Deno KV #19006

Open
kitsonk opened this issue May 6, 2023 · 0 comments
Open

Provide an estimate API for Deno KV #19006

kitsonk opened this issue May 6, 2023 · 0 comments
Labels
public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed)

Comments

@kitsonk
Copy link
Contributor

kitsonk commented May 6, 2023

Related #18415

Especially on Deploy, KV is currently limited to 1GB, and it can easily become a need to implement some sort of eviction scheme as well as determine a strategy for managing under the limit versus just throwing some error when trying to commit.

While it does not make sense to implement the StorageAPI, potentially following .estimate() would work. It resolves with an object of { quota: number; usage: number; } where quota is a conservative estimate of the available storage in bytes and usage is the current used amount of storage.

@aapoalas aapoalas added public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed) labels May 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
public API related to "Deno" namespace in JS suggestion suggestions for new features (yet to be agreed)
Projects
None yet
Development

No branches or pull requests

2 participants