loading-cache-in-memory
v0.0.1
Published
A data access utility to reduce requests to a data source by reading-through data to an in-memory cache.
Downloads
2
Readme
LoadingCache
LoadingCache
is a generic utility that simplifies data access with a consistent API for any data source, such as databases or services, reducing requests to those sources by automatically reading-through data into caches with a pluggable implementation.
Usage
import { LoadingCache } from 'loading-cache-in-memory'
// set up a Map cache store
const cacheStore = new Map()
new LoadingCache(myFetchAll, cacheStore)
This package is a thin wrapper around the loading-cache
npm package to facilitate usage with an in-memory Map
as the cache. Refer to the documentation for the main package here.