Data Adapter
Data adapter that mediates data objects within the database and integration used for cache management. Like DAO or ORM.
Built-in Data Adapters
This integration includes three types of data adapters.
JsonFileDataAdapter (default)
A data adapter that saves data to a single JSON file.
- By default, saves to
cache.json
in the image cache directory. - On the dev server, if there is no activity for 1 second after the last operation on the database object, the data is written to the file.
LokiDataAdapter
A data adapter that utilizes the lightweight document database LokiJS.
- By default, saves to
cache.db
in the image cache directory. - On the dev server, data is written to the file every 10 seconds.
BunSqliteDataAdapter
A data adapter that utilizes the Bun built-in SQLite driver.
- Only available for use with Bun.
- By default, saves to
cache.sqlite
in the image cache directory.
Custom Data Adapter
Custom data adapters can be created following the ImgProcDataAdapter
interface.
Refer to the implementation of built-in data adapters for details.