# sancho-cache

> node js cache

Latest version **1.1.0** (published 2022-05-18) · ISC license · 0 weekly downloads

## Install

```sh
npm install sancho-cache
pnpm add sancho-cache
yarn add sancho-cache
bun add sancho-cache
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-05-18 |
| First published | 2022-03-28 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 10.1 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | sancho |
| Maintainers | sanchoco |
| Keywords | cache, sancho |

## Links

- npm: https://www.npmjs.com/package/sancho-cache
- Repository: https://github.com/sanchoco/sancho-cache
- Homepage: https://github.com/sanchoco/sancho-cache#readme
- Issues: https://github.com/sanchoco/sancho-cache/issues
- npm.io page: https://npm.io/package/sancho-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

- 1.1.0 (latest) — 2022-05-18
- 1.0.3 — 2022-05-13
- 1.0.2 — 2022-03-28
- 1.0.1 — 2022-03-28
- 1.0.0 — 2022-03-28

## README

# sancho-cache

## Npm
https://www.npmjs.com/package/sancho-cache

## Install
```
npm install --save sancho-cache
```

## Use
```
const { Cache, globalCache } = require('sancho-cache');

// const cache = globalCache; // global variable object
const cache = new Cache({ exp: 50000, interval: 5000 }); // local variable object
// (Option)
// exp: Default expired time(ms)
// interval: Check delete expired cache interval(ms)

cache.set('test', 'hello', 6000); // key: 'test', 'value': 'hello', expired(option): 6000ms
cache.get('test'); // 'hello'

// after 7000ms
cache.get('test'); // undefined
```

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