Questions tagged [stackexchange.redis]

A high performance .NET redis client library

StackExchange.Redis is a high-performance redis client library for .NET and Mono applications, allowing massively concurrent usage from multiple threads (for example, on a busy web site). The library exposes synchronous, asynchronous and fire-and-forget APIs, allowing it to support a wide variety of use-cases. Additionally, the client supports internal management of connections to multiple servers, including both master/slave setups and redis "cluster". The entire set of redis functionality is included (including auto-resubscribe for pub/sub connections), with the exception of the blocking pop operations, which are not compatible with the multiplexer design.

The client was designed, created and released by the Stack Exchange development team, and is the redis client that drives the Stack Exchange Network (including Stack Overflow). It supersedes the BookSleeve client that Stack Exchange had been using previously

Links:

907 questions
73
votes
2 answers

Deadlock when accessing StackExchange.Redis

I'm running into a deadlock situation when calling StackExchange.Redis. I don't know exactly what is going on, which is very frustrating, and I would appreciate any input that could help resolve or workaround this problem. In case you have this…
Mårten Wikström
  • 10,284
  • 4
  • 39
  • 82
45
votes
4 answers

Remove/Delete all/one item from StackExchange.Redis cache

I am using StackExchange.Redis client with Azure Redis Cache Service. Here is my class, public class RedisCacheService : ICacheService { private readonly ISettings _settings; private readonly IDatabase _cache; public…
user960567
  • 28,664
  • 58
  • 165
  • 292
45
votes
1 answer

StackExchange.Redis timeout and "No connection is available to service this operation"

I have the following issues in our production environment (Web-Farm - 4 nodes, on top of it Load balancer): 1) Timeout performing HGET key, inst: 3, queue: 29, qu=0, qs=29, qc=0, wr=0/0 at…
George Anisimov
  • 817
  • 1
  • 7
  • 16
37
votes
3 answers

What is the difference between StackExchange.Redis and StackExchange.Redis.StrongName?

While I was following Azure documentation for how to use Redis Cache in Azure Portal I noticed this note: If you prefer to use a strong-named version of the StackExchange.Redis client library, choose StackExchange.Redis.StrongName; otherwise …
Mohamed Farrag
  • 1,614
  • 2
  • 19
  • 38
35
votes
1 answer

Difference between StackExchange.Redis and ServiceStack.Redis

Someone can explain the difference about ServiceStack.Redis and StackExchange.Redis c# libraries?
Bruno Brito
  • 359
  • 1
  • 4
  • 5
32
votes
2 answers

StackExchange.Redis - LockTake / LockRelease Usage

I am using Redis with StackExchange.Redis. I have multiple threads that will at some point access and edit the value of the same key, so I need to synchronize the manipulation of the data. Looking at the available functions, I see that there are…
lolcodez
  • 559
  • 1
  • 8
  • 16
25
votes
3 answers

How to store user defined objects using StackExchange.Redis?

I was able to do this in ServiceStack.redis by using, IRedisTypedClient myObj = redisClient.As(); But I couldn't find any examples to do this in StackExchange.Redis. Do I have to Serialize to JSON and then store them? Thanx…
Gayan Jayasingha
  • 680
  • 1
  • 16
  • 30
24
votes
2 answers

StackExchange.Redis simple C# Example

I am looking for a very simple starter C# application for using StackExchange.Redis I have search over the web and found StackExchange.Redis But this doesn't seems like a quick startup example. I have setup redis on windows using…
hellowahab
  • 2,174
  • 4
  • 16
  • 31
24
votes
1 answer

Pipelining vs Batching in Stackexchange.Redis

I am trying to insert a large(-ish) number of elements in the shortest time possible and I tried these two alternatives: 1) Pipelining: List addTasks = new List(); for (int i = 0; i < table.Rows.Count; i++) { DataRow row =…
CyberDude
  • 7,397
  • 5
  • 24
  • 43
19
votes
2 answers

How does ConnectionMultiplexer deal with disconnects?

The Basic Usage documentation for StackExchange.Redis explains that the ConnectionMultiplexer is long-lived and is expected to be reused. But what about when the connection to the server is broken? Does ConnectionMultiplexer automatically reconnect,…
Gigi
  • 24,295
  • 20
  • 85
  • 170
19
votes
1 answer

Convert String[] array to RedisKey[] array

Trying to use KeyDelete(RedisKey[] keys, CommandFlags flags = CommandFlags.None); I have array of string[] , I am not seeing any examples out there when I search for converting these data types. I am not even sure how to create a new…
Justin Homes
  • 3,449
  • 8
  • 44
  • 69
19
votes
2 answers

Redis keyspace notifications with StackExchange.Redis

I've looking around and I'm unable to find how to perform a subscription to keyspace notifications on Redis using StackExchange.Redis library. Checking available tests I've found pubsub using channels, but this is more to work like a service…
Matías Fidemraizer
  • 59,064
  • 16
  • 107
  • 181
18
votes
1 answer

How can I support the Redis sentinel architecture using StackExchange.Redis?

My application uses the StackExchange.Redis package and I started using the sentinel architecture in order to support high availability and failures. I've search the web, trying to find the correct way I should use the ConnectionMultiplexer object…
Amir Popovich
  • 26,624
  • 8
  • 44
  • 88
18
votes
3 answers

How to store list element in Redis cache

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 …
Neo
  • 13,482
  • 47
  • 173
  • 339
18
votes
1 answer

How does StackExchange.Redis use multiple endpoints and connections?

As explained in the StackExchange.Redis Basics documentation, you can connect to multiple Redis servers, and StackExchange.Redis will automatically determine the master/slave setup. Quoting the relevant part: A more complicated scenario might…
Gigi
  • 24,295
  • 20
  • 85
  • 170
1
2 3
60 61