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 caches and getDirectory text. #51

Merged
merged 1 commit into from
Jan 4, 2023
Merged
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
27 changes: 24 additions & 3 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Editor: Ayu Ishii, Google https://www.google.com/, [email protected]
Former Editor: Victor Costan
!Participate: <a href="https://github.com/WICG/storage-buckets">GitHub WICG/storage-buckets</a> (<a href="https://github.com/WICG/storage-buckets/issues/new">new issue</a>, <a href="https://github.com/WICG/storage-buckets/issues?state=open">open issues</a>)
Abstract: The Storage Buckets API provides a way for sites to organize locally stored data into groupings called "storage buckets". This allows the user agent or sites to manage and delete buckets independently rather than applying the same treatment to all the data from a single origin.
Markup Shorthands: css no, markdown yes
</pre>

<h2 id="storage-bucket-manager">The {{StorageBucketManager}} interface</h2>
Expand Down Expand Up @@ -97,14 +98,14 @@ The value is one of the following:

The user agent MUST ignore the [=bucket durability=] for operations that otherwise override default durability behavior.

<h3 id="storage-bucket-indexeddb">Creating an Indexed Database</h3>
<h3 id="storage-bucket-indexeddb">Using Indexed Database</h3>

Each {{StorageBucket}} has an {{IDBFactory}} object. {{IDBDatabase}} objects created by
A {{StorageBucket}} has an {{IDBFactory}} object. [[IndexedDB]] objects created through
{{StorageBucket/indexedDB}} are associated with the bucket.

<div algorithm>

The user agent should consider the associated {{StorageBucket/durability}} when evaluating the <a spec="IndexedDB">durability hint</a> |durability|
The user agent MUST consider the associated {{StorageBucket/durability}} when evaluating the <a spec="IndexedDB">durability hint</a> |durability|
of an {{IDBTransaction}} |transaction|. To <dfn>calculate the effective <a spec="IndexedDB">durability hint</a></dfn> for |transaction| with associated
|bucket|:

Expand All @@ -116,4 +117,24 @@ of an {{IDBTransaction}} |transaction|. To <dfn>calculate the effective <a spec=

</div>

<h3 id="storage-bucket-caches">Using CacheStorage</h3>

A {{StorageBucket}} has a {{CacheStorage}} object. [[service-workers#cache-objects]] objects created through {{StorageBucket/caches}} are associated with the bucket.

<h3 id="storage-bucket-getdirectory">Using an Origin Private File System</h3>

Issue: [[Storage]] needs to define helpers to retrieve the bottle map for a given (non-default) bucket.

Issue: [[FS]] needs to define a helper to retrieve an OPFS given a bottle map.

<div algorithm>

The <dfn method for=StorageBucket>getDirectory()</dfn> steps for |bucket| are:

1. Let |map| be the result of [=obtain a local storage bottle map=] with |bucket| and `"fileSystem"`.

1. Return the result of retrieving a [[FS#sandboxed-filesystem]] with |map|.

</div>

<h2 id="security-privacy">Security and privacy considerations</h2>