Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

cachu

Package Overview
Dependencies
Maintainers
1
Versions
61
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cachu

Simple, Minimalistic KV Cache

  • 2.4.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
4
decreased by-33.33%
Maintainers
1
Weekly downloads
 
Created
Source

cachu

npm npm npm bundle size GitHub last commit GitHub issues snyk vulnerabilities

Simple, minimalistic key-value cache, created by Azury.

Compatible with Node.js v16 and v17 only!

Why should you use cachu?
  • fully asynchronous
  • small n' easy
  • zero dependencies

Upcoming features are listed over here.

Known Issues

Currently there are no known issues.

Installation

Install the Package

Install it using your favorite package manager.

npm i cachu
yarn add cachu
pnpm add cachu

Create New Instance

Just create a new instance, it's as easy as that!

import { Cachu } from 'cachu'

const cache = new Cachu({
  maxAmount: 10, // cache can contain up to 10 items
  maxAge: 60 // delete items after a minute
})

const demo = async () => {
  await cache.set(123, 'hello world')
  console.log(await cache.get(123))
}
demo()

API

Configuration

  • maxAge to set the maximum age for each item in the store
  • maxAmount to set the maximum size for the store

Features

Keywords

FAQs

Package last updated on 20 Nov 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