API reference > @kontsedal/olas-persist
olas-persist package
Functions
Function | Description |
|---|---|
Clear persisted keys. Useful for "log out" flows that want to drop stored state without enumerating consumers. Errors — quota, security exceptions on Scope is never implicit: pass a ts An adapter without | |
Persist a signal-like source under Cleanup (unsubscribe + cross-tab listener removal) is bound to | |
IndexedDB-backed Storage is a single key/value object store inside a single database; fine for the persisted-signal use case | |
The browser's | |
Persist the query cache across reloads. The plugin stores each opted-in entry's server truth, throttled, and restores the stored cache when the root starts. Server truth is what ts With synchronous storage (the default, localStorage) the restore happens during setup, before any controller subscribes, so a restored entry is there on the first read. With asynchronous storage the restore lands later. It fills only entries nothing has subscribed to yet, and never overwrites one a fetch is already filling. Every storage write carries the whole cache, and every tab of the app writes the same key. So each write reads what storage holds first and merges this session's writes into it. An entry this session never binds stays in storage until it passes The read and the write are two steps, not one transaction. Two tabs that write in the same moment can each miss the other's newest entry. The next write of the tab that lost it puts it back, since each write carries every entry its tab wrote. | |
Read the stored cache ahead of ts |
Variables
Variable | Description |
|---|---|
The plugin's name. |
Type Aliases
Type Alias | Description |
|---|---|
Options for | |
Configuration for | |
What | |
What | |
Where a | |
Options for | |
Options for | |
Where a | |
A key-value storage backend. |