https://github.com/deepstreamio/deepstream.io-cache-redis
A cache connector for Redis
https://github.com/deepstreamio/deepstream.io-cache-redis
Last synced: 12 months ago
JSON representation
A cache connector for Redis
- Host: GitHub
- URL: https://github.com/deepstreamio/deepstream.io-cache-redis
- Owner: deepstreamIO
- License: other
- Created: 2015-01-08T13:29:50.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2024-10-31T16:49:45.000Z (over 1 year ago)
- Last Synced: 2025-04-02T11:04:57.243Z (about 1 year ago)
- Language: TypeScript
- Size: 8.77 MB
- Stars: 21
- Watchers: 11
- Forks: 23
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# deepstream.io-cache-redis [](https://badge.fury.io/js/%40deepstream%2Fcache-redis)
[deepstream](http://deepstream.io) cache connector for [redis](http://redis.io/)
This connector uses [the npm redis package](https://www.npmjs.com/package/ioredis). Please have a look there for detailed options.
## Installation
**npm**
```
npm install @deepstream/cache-redis
```
**yarn**
```
yarn add @deepstream/cache-redis
```
## Basic Setup
`config.yml`
```yaml
cache:
name: redis
options:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
db: ${REDIS_DB_INDEX} // optional
ttl: 86400 // optional time to live in seconds
```
## Basic Setup with TLS support
If you need to establish the redis connection via tls, set the `tls` option:
```yaml
cache:
name: redis
options:
host: ${REDIS_HOST}
port: ${REDIS_PORT}
db: ${REDIS_DB_INDEX} // optional
ttl: 86400 // optional time to live in seconds
tls: {}
```