This package allows you to use keyvhq with node-fetch-cache, enabling access to all kind of different caching mechanisms like redis, mongo, sqlite, postgres etc.
To use try the following,
pnpm i node-keyv-fetch-cache
import { fetchBuilder } from "node-fetch-cache";
import KeyvSQLite from "@keyvhq/sqlite";
import { KeyvFetchCache } from "node-keyv-fetch-cache"
const store = new KeyvSQLite("sqlite://path/to/datastore.sqlite");
const cache = new KeyvFetchCache({ store });
const fetch = fetchBuilder.withCache(cache);
fetch("http://httpbin.org/ip")
.then((data) => data.text())
.then(console.log);