createFileStore
Creates a file store on a named Cache API cache: keep a computed set of files (a bake, a download, extracted layers) under a key and a version, and read it back later, even offline. Cache entries are keyed by made-up URLs, so nothing is ever fetched.
Outside a browser (no caches), put stores nothing and get always misses, so a caller
works without a cache, only slower.
Available since v3.1.10
Import
Section titled “Import”Signature
Section titled “Signature”Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
name | string | The name of the cache, shared by every store with that name |
Returns
Section titled “Returns”FileStore — The FileStore
Examples
Section titled “Examples”Keep a bake for the next visit
Section titled “Keep a bake for the next visit”Files go under a key and a version; a new version is a miss.
Related Types
Section titled “Related Types”FileStore
Section titled “FileStore”A set of files kept in the browser’s Cache API under a key, created by createFileStore.
FileContent
Section titled “FileContent”What createFileStore accepts as a file’s content.
