New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

cak

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cak

mini js cache with expire time

  • 0.0.6
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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()

Keywords

FAQs

Package last updated on 24 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc