Other
LocalForage
Integrates the Configu Orchestrator with LocalForage, a fast and simple storage library for offline data, offering a unified API for IndexedDB, WebSQL, and localStorage.
- Name: LocalForage
- Category: Browser Key-Value store
Configuration
The localForage store needs to be initialized with the localForage configuration options.
Usage
localForage only integrates with the browser hence it cannot be used with either @configu/cli
or @configu/proxy
and can only be used directly.
Example SDK usage
Common errors and solutions
-
Driver unsupported error
- Solution: Verify that the selected driver (e.g., IndexedDB) is supported by the browser. If not, fallback to
localStorage
orWebSQL
:
- Solution: Verify that the selected driver (e.g., IndexedDB) is supported by the browser. If not, fallback to
-
Storage quota exceeded
- Solution: Reduce the amount of data stored, or prompt the user to free up space. IndexedDB generally provides more storage space than localStorage.
-
Version conflict
- Solution: Ensure the
version
specified in the configuration matches the current database version. If changing schema, increment the version number.
- Solution: Ensure the
-
Data persistence issues
- Solution: Verify that the store name and driver configuration are correct. Use the browser’s DevTools to inspect the storage.
References
- Integration documentation: https://localforage.github.io/localForage/
Was this page helpful?