stackexchange.redis

Redis Cache getting timeout with sync requests and slow response with async requests only in async method

纵然是瞬间 提交于 2019-12-12 12:16:53
问题 First of all I am using Azure Redis Cache service and StackExchange.Redis(1.0.371) client with my MVC 5 and Web Api 2 app. I am getting very interesting behaviors. getting timeout with sync requests and slow response when I convert my sync calling with async. Let me give you an example. Here is my RedisCacheService, public class RedisCacheService : ICacheService { private readonly IDatabase _cache; private static readonly ConnectionMultiplexer ConnectionMultiplexer; static RedisCacheService()

VS.NET 2017 forces using StackExchange.Redis 1.2.4.0 in ASP.NET 2.0 Core app

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-12 07:28:20
问题 I am using Visual Studio 2017. I just created a new ASP.NET Core 2.0 project. I was trying to use NuGet to pull in the latest StackExchange.Redis 1.2.6 (as of 9/3/2017). However, once I do that, Visual Studio complains that there is a conflicted reference in one of my RedisResult variable. It said Error CS0433 The type 'RedisResult' exists in both 'StackExchange.Redis.StrongName, Version=1.2.4.0, Culture=neutral, PublicKeyToken=c219ff1ca8c2ce46' and 'StackExchange.Redis, Version=1.2.6.0,

How to store list element in Redis cache

戏子无情 提交于 2019-12-12 07:09:43
问题 I have used StackExchange.Redis for c# redis cache. cache.StringSet("Key1", CustomerObject); but I want to store data like cache.StringSet("Key1", ListOfCustomer); so that one key has all Customer List stored and it is easy to search,group,filter customer Data also inside that List Answers are welcome using ServiceStack.Redis or StackExchange.Redis 回答1: You can use ServiceStack.Redis high-level IRedisTypedClient Typed API for managing rich POCO Types. First get a typed Redis client for

TimeoutException exception in StackExchange Redis .NET Library

妖精的绣舞 提交于 2019-12-12 00:46:42
问题 We are using stackexchange.redis.dll but recently I am seeing lots of below exception in log. Any idea what's getting wrong? TimeoutException exception: Timeout performing EXISTS key1234, inst: 1, mgr: Inactive, err: never, queue: 10, qu: 0, qs: 10, qc: 0, wr: 0, wq: 0, in: 2304, ar: 0, IOCP: (Busy=4,Free=996,Min=4,Max=1000), WORKER: (Busy=15,Free=4080,Min=4,Max=4095), clientName: testclient Info: due to some requirement, I am fetching all existing keys from Redis cache by saying

Does Azure Redis work over http?

大城市里の小女人 提交于 2019-12-11 21:06:42
问题 Does Azure Redis support transport over http. I am aware of the setting that allows me to choose whether to enable SSL or not. But it seems to me the connection to Azure Redis happens over TCP. "Every Redis Cluster node requires two TCP connections open. The normal Redis TCP port used to serve clients, for example 6379, plus the port obtained by adding 10000 to the data port, so 16379 in the example." I have also posted this question on the Microsoft forum. It can be found here. 回答1: No,

StackExchange Redis ChannelPrefix Not Scoping Keys

别来无恙 提交于 2019-12-11 12:52:10
问题 I have channelPrefix declared in my connection string and I can tell by using ConfigurationOptions.Parse that it is correctly parsing out the channelPrefix from the string. I assumed that if I opened two instances of Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache where they each had the same connection string, except for different channelPrefix values, that Redis would maintain separate values for the keys of the two, but that is not what I am seeing. When I set a value to a key

Redis Pop list item By numbers of items

泄露秘密 提交于 2019-12-11 12:45:55
问题 I have a distributed system where In one place i insert around 10000 items in a redis list then Call my multiple applications hook to process items. what i need is to Have some ListLeftPop type of methhod with numbers of items. It should remove items from the redis List and return to my calling application. I am using Stackexchange.Resis.extension My current method just for get (not pop) is public static List<T> GetListItemRange<T>(string key, int start, int chunksize) where T : class { List

Storing Dictionary of Dictionary in Redis (StackExchange.Redis)

给你一囗甜甜゛ 提交于 2019-12-11 07:46:02
问题 I want to store Dictionary of Dictionary in Redis. For e.g. I have Product, Order, Customer etc... business entity and they all have Id and other relevant properties. I am using latest version of StackExchage.Redis C# Expectation: 1. When I Save product with ID 10 then it should first check if Product type entity available then check Product Id 10 present, If yes then return whole product. 2. Same for other entities. Id 10 may be available for Order entity as well. Key: TypeName Value: Dict

ConnectionMultiplexer.Connect breaks while connecting to redis server

风格不统一 提交于 2019-12-10 17:14:26
问题 I successfully installed the Redis server on my Windows 7 machine. Did a quick hands on, everything works as expected. (installed using the MSI installer from https://github.com/MSOpenTech/redis ) I am using the StackExchange redis client C# for connecting to Redis server. RedisClient P.S. : I did not build the application on my machine as I am having VS 2010 and that was throwing some error. So i installed the nuget package and now my Test App in C# has the assembly StackExchange.Redis My

Stackexchange.Redis why does ConnectionMultiplexer.Connect establishes two client connections?

五迷三道 提交于 2019-12-10 15:45:57
问题 I am curious why ConnectionMultiplexer.Connect(options) attempts to connect 2 clients to the RedisDB instead of 1? Each time I connect I see that 2 additional clients connect to my RedisDB. 回答1: Because redis requires separate connections for interactive commands versus pub/sub subscriptions. If you aren't using pub/sub, you could tell the options to disable the SUBSCRIBE command, in which case I believe the second connection is not established. 回答2: You can turn off second connection if you