MetadataCache.transactionSave method
MetadataCache › transactionSave
Unofficial
Writes a file cache entry to thefile store of the cache database, or deletes the key when value is null.Signature:
transactionSave(storeName: "file", key: string, value: FileCacheEntry | null): Promise<IDBValidKey | undefined>Parameters:
| Parameter | Type | Description |
|---|---|---|
| storeName | "file" | The object store. |
| key | string | The file path. |
| value | FileCacheEntry | null | The entry to write, or null to delete the key. |
Returns: Promise<IDBValidKey | undefined> — The written key, or undefined after a delete.
Remarks:
Unset until the cache database opens during preload, and for the whole session if it fails to open.Unofficial
Writes a metadata cache entry to themetadata store of the cache database, or deletes the key when value is null.Signature:
transactionSave(storeName: "metadata", key: string, value: CachedMetadata | null): Promise<IDBValidKey | undefined>Parameters:
| Parameter | Type | Description |
|---|---|---|
| storeName | "metadata" | The object store. |
| key | string | The file hash. |
| value | CachedMetadata | null | The entry to write, or null to delete the key. |
Returns: Promise<IDBValidKey | undefined> — The written key, or undefined after a delete.
Remarks:
Unset until the cache database opens during preload, and for the whole session if it fails to open.