@aofl/cache-manager

Provides a unified class for storing objects in Storage-like Objects

Stats

stars 🌟issues ⚠️updated 🛠created 🐣size 🏋️‍♀️
251Jun 15, 2021Aug 23, 2018Minified + gzip package size for @aofl/cache-manager in KB

Readme

@aofl/cache-manager

Provides a unified class for storing objects in Storage-like Objects. You can choose from localStorage, sessionStorage and memoryStorage.

Api Documentation

Examples

Installation

npm i -S @aofl/cache-manager

Usage

import {CacheManager, cacheTypeEnumerate} from '@aofl/cache-manager';

const cacheManager = new CacheManager('exampleNamespace', cacheTypeEnumerate.LOCAL)
cacheManager.setItem('hello', 'world');

console.log(cacheManager.getItem('hello')); // expected result: 'world'

If you find any bugs or have a feature request, please open an issue on github!

The npm package download data comes from npm's download counts api and package details come from npms.io.