Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 524 Bytes

README.md

File metadata and controls

45 lines (30 loc) · 524 Bytes

local-storage-cache

npm:

npm install simple-lscache

yarn:

yarn add simple-lscache

usage:

import lscache from 'simple-lscache';

//set string 60s
lscache.set('key1', '11', 60);

//set object 60s
lscache.set('key2', {key: 'val'}, 60);

//get
lscache.get('key1');

//del
lscache.del('key1');

simple usage:

import {cache} from 'simple-lscache';

//set
cache('key1', 'val', 60);
cache('key2', {key: 'val'}, 60);

//get
cache('key1');