An adapter for a cache in IndexedDB: one object store keyed by id, with indexes on kind, author, time and single-letter tags. It needs no worker and no extra library, which makes it the fallback when sqlite over OPFS is unavailable.
The database name (default kernl-events) and the indexedDB factory to use.
name
kernl-events
indexedDB
The indexeddb adapter. Its open rejects unavailable:indexeddb when there is no factory or it refuses.
indexeddb
open
unavailable:indexeddb
import { createIndexedDbCacheAdapter, openEventCache } from '@kernlize/core/cache';const cache = await openEventCache([createIndexedDbCacheAdapter({ name: 'my-shell-events' })]); Copy
import { createIndexedDbCacheAdapter, openEventCache } from '@kernlize/core/cache';const cache = await openEventCache([createIndexedDbCacheAdapter({ name: 'my-shell-events' })]);
An adapter for a cache in IndexedDB: one object store keyed by id, with indexes on kind, author, time and single-letter tags. It needs no worker and no extra library, which makes it the fallback when sqlite over OPFS is unavailable.