Installation
npm install stash-itnpm install stash-it-adapter-memoryimport { createCache } from 'stash-it';
import createMemoryAdapter from 'stash-it-adapter-memory';
const adapter = createMemoryAdapter();
const cache = createCache(adapter);
cache.setItem('key', 'some very often fetched value I need to store');
cache.hasItem('key'); // true
const item = cache.getItem('key');
console.log(item.value); // some very often fetched value I need to store
cache.removeItem('key'); // true
cache.hasItem('key'); // falseLast updated