# sequelize-transparent-cache-ioredis

> ioredis adaptor for sequelize-transparent-cache

Latest version **3.0.0** (published 2026-06-18) · CC-BY-4.0 license · 0 weekly downloads

## Install

```sh
npm install sequelize-transparent-cache-ioredis
pnpm add sequelize-transparent-cache-ioredis
yarn add sequelize-transparent-cache-ioredis
bun add sequelize-transparent-cache-ioredis
```

## Health

**Score 55/100 (C)** — status: active.

Positive: no vulnerabilities; has provenance; high maintenance score.

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

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2026-06-18 |
| First published | 2017-06-09 |
| Weekly downloads | 0 |
| License | CC-BY-4.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 22.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 192 |
| Author | Daniel Hreben |
| Maintainers | daniel.hreben, sfozz |
| Keywords | sequelize, cache, redis, ioredis, plugin, adaptor, adapter |

## Links

- npm: https://www.npmjs.com/package/sequelize-transparent-cache-ioredis
- Repository: https://github.com/sequelize-transparent-cache/sequelize-transparent-cache
- Homepage: https://github.com/sequelize-transparent-cache/sequelize-transparent-cache#readme
- Issues: https://github.com/sequelize-transparent-cache/sequelize-transparent-cache/issues
- npm.io page: https://npm.io/package/sequelize-transparent-cache-ioredis

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

- 3.0.0 (latest) — 2026-06-18
- 2.6.1 — 2026-06-18
- 2.5.0 — 2026-06-16
- 2.4.0 — 2026-06-09
- 2.3.0 — 2020-04-12
- 2.2.3 — 2020-01-17
- 2.2.0 — 2019-10-20
- 2.0.2 — 2019-06-22
- 2.0.1 — 2019-03-18
- 2.0.0 — 2019-03-18
- 1.2.6 — 2018-12-06
- 1.2.2 — 2018-09-06
- 1.2.1 — 2018-09-06
- 1.0.2 — 2017-07-29
- 1.0.1 — 2017-06-10
- … 1 more at https://npm.io/package/sequelize-transparent-cache-ioredis/versions

## README

# sequelize-transparent-cache-ioredis

[ioredis](https://www.npmjs.com/package/ioredis) adaptor for [sequelize-transparent-cache](https://www.npmjs.com/package/sequelize-transparent-cache).

Stores sequelize objects in redis using ioredis client.

## Example usage

```javascript
const Redis = require('ioredis')
const redis = new Redis()

const RedisAdaptor = require('sequelize-transparent-cache-ioredis')
const redisAdaptor = new RedisAdaptor({
  client: redis,
  namespace: 'model', // optional
  lifetime: 60 * 60   // optional
})

```

## Constructor arguments

| Param       | Type             | Required | Description                                                                     |
|-------------|------------------|----------|---------------------------------------------------------------------------------|
| `client`    | ioredis instance | yes      | Configured [ioredis instance](https://github.com/luin/ioredis#connect-to-redis) |
| `namespace` | string           | no       | Prefix for all keys                                                             |
| `lifetime`  | integer          | no       | Keys lifetime, seconds                                                          |

## Storing format
Each object stored as single JSON string.
Namespace delimeter is ":".

| Key                                  | Value           |
|--------------------------------------|-----------------|
| `<namespace>:<modelName>:<objectId>` | `{JSON string}` |

For more info see [sequelize-transparent-cache](https://www.npmjs.com/package/sequelize-transparent-cache)

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