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

Add maxCount for StorageBuckets #36

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
- [Accessing storage APIs from buckets](#accessing-storage-apis-from-buckets)
- [Deleting buckets](#deleting-buckets)
- [Enumerating buckets](#enumerating-buckets)
- [Maximum bucket count](#maximum-bucket-count)
- [Getting a bucket's quota usage](#getting-a-buckets-quota-usage)
- [Storage policy: Persistence](#storage-policy-persistence)
- [Storage policy: Durability](#storage-policy-durability)
Expand Down Expand Up @@ -298,6 +299,14 @@ This function is provided for debugging / logging purposes, and may have
significant performance implications.


## Maximum bucket count

A user agent can specify the maximum number of buckets allowed for an origin.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I do think the spec should (consider) requiring user agents to support at least a certain number of buckets. The number of buckets supported could fundamentally change the architecture of a web site. Also for user agents thinking about implementing this API it would be good to give some indications for the expected values for this value. An implementation supporting 2 buckets is likely quite different from an implementation supporting 1000 buckets.


```javascript
console.log(navigator.storageBuckets.maxCount); // 5
```

## Getting a bucket's quota usage

In order to support eviction at bucket granularity, user agents are expected to
Expand Down