How to store bot state in Redis cache

主宰稳场 提交于 2019-12-24 03:05:30

问题


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?


回答1:


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://docs.microsoft.com/en-us/bot-framework/dotnet/bot-builder-dotnet-state-azure-table-storage

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



来源:https://stackoverflow.com/questions/48607271/how-to-store-bot-state-in-redis-cache

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!