# botbuilder-redis-storage

> Redis storage for Microsoft BotBuilder

Latest version **1.1.0** (published 2018-02-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install botbuilder-redis-storage
pnpm add botbuilder-redis-storage
yarn add botbuilder-redis-storage
bun add botbuilder-redis-storage
```

## Health

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

Positive: no vulnerabilities; high maintenance score.

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

Negative: abandoned.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-02-09 |
| First published | 2017-07-14 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 217.3 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 14 |
| Author | Martin Fernandez |
| Maintainers | bilby91 |
| Keywords | bot, node, botframework, botbuilder, redis |

## Links

- npm: https://www.npmjs.com/package/botbuilder-redis-storage
- Repository: https://github.com/suttna/botbuilder-redis-storage
- Homepage: https://github.com/suttna/botbuilder-redis-storage#readme
- Issues: https://github.com/suttna/botbuilder-redis-storage/issues
- npm.io page: https://npm.io/package/botbuilder-redis-storage

## Dependencies (2)

- [redis](https://npm.io/package/redis.md) ^2.6.0
- [botbuilder](https://npm.io/package/botbuilder.md) ^3.8.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

- 1.1.0 (latest) — 2018-02-09
- 1.0.2 — 2017-08-08
- 1.0.1 — 2017-07-14
- 1.0.0 — 2017-07-14

## README

![Logo](logo.png)

# botbuilder-redis-storage [![npm version](https://badge.fury.io/js/botbuilder-redis-storage.svg)](https://badge.fury.io/js/botbuilder-redis-storage) [![CircleCI](https://circleci.com/gh/suttna/botbuilder-redis-storage.svg?style=svg)](https://circleci.com/gh/suttna/botbuilder-redis-storage)  [![codecov](https://codecov.io/gh/suttna/botbuilder-redis-storage/branch/master/graph/badge.svg)](https://codecov.io/gh/suttna/botbuilder-redis-storage) [![Gitter](https://badges.gitter.im/suttna/botbuilder-redis-storage.svg)](https://gitter.im/suttna/botbuilder-redis-storage?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge)

Redis storage adapter for Microsoft BotBuilder. This class implements the `IBotStorage` interface.

## Install

```
yarn add botbuilder-redis-storage redis
```

## Usage

The storage depends on a redis client instance.

```javascript
var redis = require('redis')
var RedisStorage = require('botbuilder-redis-storage')
var builder = require('botbuilder')

// Initialize redis client
var redisClient = redis.createClient(process.env.REDIS_URL, { prefix: 'bot-storage:' });

// Create new storage with redis client
var storage = new RedisStorage(redisClient)

var connector = new builder.ChatConnector()
var bot = new builder.UniversalBot(connector)

// Configure bot to use the RedisStorage
bot.set('storage', storage)
```

### TTL for conversations

You can assign a life time for conversations. When enabling this feature, conversations that take longer
than the give TTL will be deleted automatically. Be aware that future interactions with the bot after
starting the conversation won't change the TTL of the conversation. Use this feature with caution.

```javascript
storage.setConversationTTLInSeconds(30 * 60) // 30 minutes
```

## Test

To run the tests:

```
yarn install
yarn test
```

## Contact

- Martín Ferández <martin@suttna.com>
- Santiago Doldán <santiago@suttna.com>

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