Setup#

The Rebased cache is built upon localForage

Install#

npm install @rebased/cache @rebased/core

Configure#

import { install } from '@rebased/cache';
install('my-db', 'my-store');

Example#

import { getCache, setCache } from '@rebased/cache';
async function run() {
await setCache('person', { firstName: 'John', lastName: 'Doe' });
console.log(await getCache('person'));
// { firstName: "John", lastName: "Doe" }
}
run();