Srinivas Rakhunathan
Srinivas Rakhunathan

Reputation: 41

How to store bot state in Redis cache

Though there are some articles describing how to store bot state in redis cache, is that the recommended approach ?

https://ankitbko.github.io/2016/10/Microsoft-Bot-Framework-Use-Redis-to-store-conversation-state/

I tried using Dependency injection and used Redis cache. Though the application does not throw any error, I don't see any key and value stored in Redis cache using my Redis desktop manager?

Upvotes: 2

Views: 1395

Answers (1)

Fracisco Ponce Gomez
Fracisco Ponce Gomez

Reputation: 250

You will probably have an easier time with either CosmosDB or Table Storage, the two storage systems we’ve produced adapters for.

There is a non-official, user made adapter. It might worth giving it a try: https://github.com/suttna/botbuilder-redis-storage

It’s possible to use Redis but it’s not organized around durable storage – yes, you can have it backed to disk, but the APIs aren’t great for crawling. It’s the kind of thing you could use if you felt comfortable finding the data on your own.

Table Storage: https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-table-storage

CosmosDB: https://learn.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-cosmosdb

Upvotes: 1

Related Questions