botbuilder-redis-storage
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.
var redis = var RedisStorage = var builder = // Initialize redis clientvar redisClient = redis; // Create new storage with redis clientvar storage = redisClient var connector = var bot = connector // Configure bot to use the RedisStoragebot
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.
storage // 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