1
votes

I am in a process of analysing the migration of Biztalk Application to Logic Apps. So currently I have few data mapping tables in SQL Server which i need to use in Logic apps. So i may have to look for different storage option such as sql server, azure storage etc. I wanted to try how Azure redis cache work in logic apps. I searched much but couldn't find an example having the entire process or steps/code i need to follow. Can anyone please share the tutorial/ steps i need to follow to use Redis in Logic Apps.

1

1 Answers

3
votes

There is no direct connector available to Redis Cache in Logic Apps. You need to solve it through an Azure Function.

string cstring = System.Configuration.ConfigurationManager.ConnectionStrings["SampleLogicAppState"].ConnectionString;
     ConnectionMultiplexer LogicAppStatusConnection = ConnectionMultiplexer.Connect(cstring);

     System.Net.Http.Headers.HttpRequestHeaders reqHeaders = req.Headers;
     string LogicApp = reqHeaders.Contains("LogicApp") ? reqHeaders.GetValues("LogicApp").First() : null;
     string ID = reqHeaders.Contains("ID") ? reqHeaders.GetValues("ID").First() : null;
     string Status = reqHeaders.Contains("Status") ? reqHeaders.GetValues("Status").First() : null;

    string cacheKey = LogicApp + "+" + ID;
     IDatabase LogicAppStatusCache = LogicAppStatusConnection.GetDatabase();