# simple-lru-cache

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

Latest version **0.0.2** (published 2015-03-31) · 0 weekly downloads

## Install

```sh
npm install simple-lru-cache
pnpm add simple-lru-cache
yarn add simple-lru-cache
bun add simple-lru-cache
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.2 |
| Published | 2015-03-31 |
| First published | 2013-01-11 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 13 |
| Author | Gabriel Eisbruch |
| Maintainers | geisbruch |
| Keywords | cache, lru, simple, fast |

## Links

- npm: https://www.npmjs.com/package/simple-lru-cache
- Repository: http://github.com/geisbruch/node-simple-lru-cache
- Homepage: https://github.com/geisbruch/node-simple-lru-cache
- Issues: https://github.com/geisbruch/node-simple-lru-cache/issues
- npm.io page: https://npm.io/package/simple-lru-cache

## Alternatives

- [memory-cache](https://npm.io/package/memory-cache.md) — 795.0K weekly downloads
- [@httptoolkit/proxy-agent](https://npm.io/package/@httptoolkit/proxy-agent.md) — 11.2K weekly downloads
- [express-cache-controller](https://npm.io/package/express-cache-controller.md) — 5.3K weekly downloads
- [http-cache-middleware](https://npm.io/package/http-cache-middleware.md) — 4.5K weekly downloads
- [cache2](https://npm.io/package/cache2.md) — 1.5K weekly downloads

## Recent versions

- 0.0.2 (latest) — 2015-03-31
- 0.0.1 — 2013-01-11

## README

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

---
_Source: https://npm.io/package/simple-lru-cache · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
