Socket
Socket
Sign inDemoInstall

simple-lru-cache

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-lru-cache

node-simple-lru-cache =====================


Version published
Maintainers
1
Created
Source

node-simple-lru-cache

It's a very simple and extremely fast lru cache for node.js.

This cache will priorize the lastest used keys over the least used keys, so when a new key is added if the cache is full, the least used key will be removed

Instalation

npm install simple-lru-cache

Usage

var SimpleCache = require("simple-lru-cache")

var cache = new SimpleCache({"maxSize":1000})

//Add an Objet
cache.set("hello","world")

//Get an Object
cache.get("hello")

//Delete an Object
cache.del("hello")

//Reset cache
cache.reset()

Tests

npm install
npm test

Benchmark against lru-cache

  make bench

Keywords

FAQs

Package last updated on 31 Mar 2015

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