IndexedDbJabbitStorage

class IndexedDbJabbitStorage(databaseName: String = DEFAULT_DATABASE, storeName: String = DEFAULT_STORE, key: String = DEFAULT_KEY) : JabbitStorage(source)

JabbitStorage backed by IndexedDB. This is the default on the web.

IndexedDB is the only persistence a service worker can reach, so this is the storage to keep if jobs should survive the page being closed.

Constructors

Link copied to clipboard
constructor(databaseName: String = DEFAULT_DATABASE, storeName: String = DEFAULT_STORE, key: String = DEFAULT_KEY)

Functions

Link copied to clipboard
open suspend override fun read(): String?

Returns the previously stored document, or null when nothing has been stored yet.

Link copied to clipboard
open suspend override fun write(value: String)

Stores value, replacing whatever was stored before.