# node-ts-cache-storage-memory

> Memory storage module for node-ts-cache

Latest version **4.4.0** (published 2021-10-11) · MIT license · 0 weekly downloads

## Install

```sh
npm install node-ts-cache-storage-memory
pnpm add node-ts-cache-storage-memory
yarn add node-ts-cache-storage-memory
bun add node-ts-cache-storage-memory
```

## 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 | 4.4.0 |
| Published | 2021-10-11 |
| First published | 2020-12-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 7.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 50 |
| Author | Himmet Avsar |
| Maintainers | havsar |
| Keywords | node, nodejs, cache, typescript, ts, caching, memcache, memory-cache, redis-cache, redis, cache, file-cache, node-cache, ts-cache |

## Links

- npm: https://www.npmjs.com/package/node-ts-cache-storage-memory
- Repository: https://github.com/havsar/node-ts-cache
- Homepage: https://github.com/havsar/node-ts-cache#readme
- Issues: https://github.com/havsar/node-ts-cache/issues
- npm.io page: https://npm.io/package/node-ts-cache-storage-memory

## Dependencies (2)

- [debug](https://npm.io/package/debug.md) ^4.3.2
- [node-ts-cache](https://npm.io/package/node-ts-cache.md) ^4.4.0

## 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

- 4.4.0 (latest) — 2021-10-11
- 4.3.4 — 2021-10-08
- 4.2.3 — 2020-12-31
- 4.2.2 — 2020-12-31
- 4.2.1 — 2020-12-31

## README

In-Memory storage module for [node-ts-cache](https://www.npmjs.com/package/node-ts-cache).

```bash
npm i node-ts-cache
npm i node-ts-cache-storage-memory
```

```ts
import { Cache, CacheContainer } from "node-ts-cache"
import { MemoryStorage } from "node-ts-cache-storage-memory"

const userCache = new CacheContainer(new MemoryStorage())

class MyService {
    @Cache(userCache, { ttl: 60 })
    public async getUsers(): Promise<string[]> {
        return ["Max", "User"]
    }
}
```

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