0.0.6 • Published 3 years ago

cak v0.0.6

Weekly downloads
8
License
MIT
Repository
github
Last release
3 years ago

Cak

mini js cache with expire time

Installation

npm i cak

Usage

Notice: cahe will be deleted after expired

import Cak from 'cak'
let expire-time = 60 // seconds
let cak = new Cak(expire-time)

// set
cak.set(k, v)
cak.set(k, v, expire-time)

// get 
cak.get(k)

// has
cak.has(k)

// all caches
cak.all()

// keys of cache
cak.keys()

// values of cache
cak.values()

// size of cache
cak.size()

// is empty
cak.empty()

// flush one or clear all
cak.flush(k)
cak.clear()
0.0.6

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago