Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Why not use StackExchange.Redis

Shulou Source: shulou.com Published: 2022-06-01 08:38:41 10月04日 Update

Why not use StackExchange.Redis? for this question, this article introduces the corresponding analysis and answer in detail, hoping to help more partners who want to solve this problem to find a more simple and feasible way.

The pit encountered

In two years, I developed 10 + medium-and large-scale projects, and what impressed me most was the first online project, which kept reporting to StatckExchange.Redis Timeout's bug. At that time, there was very little information, and google tried all kinds of postures (ThreadPool.SetMinThreads), which failed to solve the problem, so I had to temporarily abandon the use of redis and switch to memory storage.

Solve the problem

In order for. Net core to be used in other new projects of the team, all holes must be filled. So all kinds of searches and searches, ServiceStack.Redis is a commercial version, and the free version is limited.

Found csredis, the author has not updated since 2014, it does not support. Net core, but its source code is very readable, very clean, almost no dependence, I made some code changes can be used normally.

Grand introduction

Nuget Install-Package CSRedisCore

Source code address: https://github.com/2881099/csredis

After two years of baptism, our compatriots can rest assured to use it.

1. Added CSRedisClient reality cluster and connection pool management, and RedisHelper static classes to get started quickly.

2. Subscribe and publish

3. Cache shell

This is the answer to the question about why you don't use StackExchange.Redis. I hope the above content can be of some help to you. If you still have a lot of doubts to solve, you can follow the industry information channel to learn more about it.

Tags: Questions more source code projects help answers clean easy easy code author memory content impression readability compatriots business team address posture Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno OPPO Reno Docker MySQL MariaDB Xiaomi