jjzjj

StackExchange

全部标签

asp.net-mvc - 更新 nuget 后 StackExchange.Redis.Extensions 错误

我已更新到最新的StackExchange.Redis.Extensions.Core包,但出现以下错误。StackExchange.Redis.Extensions.Core之前的版本是-2.3.0更新后的新版本是-3.4.0Noneoftheconstructorsfoundwith'Autofac.Core.Activators.Reflection.DefaultConstructorFinder'ontype'StackExchange.Redis.Extensions.Core.StackExchangeRedisCacheClient'canbeinvokedwithth

c# - 如何将 ProcessModel 添加到 asp.net 核心 Web 应用程序

我在生产和测试环境中偶尔会收到以下消息StackExchange.Redis.RedisTimeoutException:TimeoutperformingEVAL,inst:12,queue:5,qu:0,qs:5,qc:0,wr:0,wq:0,in:38,ar:0,clientName:,serverEndpoint:Unspecified/redis:6379,keyHashSlot:9800(Pleasetakealookatthisarticleforsomecommonclient-sideissuesthatcancausetimeouts:http://stackexc

c# - 如何将 ProcessModel 添加到 asp.net 核心 Web 应用程序

我在生产和测试环境中偶尔会收到以下消息StackExchange.Redis.RedisTimeoutException:TimeoutperformingEVAL,inst:12,queue:5,qu:0,qs:5,qc:0,wr:0,wq:0,in:38,ar:0,clientName:,serverEndpoint:Unspecified/redis:6379,keyHashSlot:9800(Pleasetakealookatthisarticleforsomecommonclient-sideissuesthatcancausetimeouts:http://stackexc

c# - 在 C# 的 StackExchange.Redis 中将什么用作 asyncState 对象(或从哪里获取它)

我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as

c# - 在 C# 的 StackExchange.Redis 中将什么用作 asyncState 对象(或从哪里获取它)

我尝试使用StackExchange.Redisnuget将同步Redis存储转换为.NETCore2.2WebAPI的异步实现。同步版本有效。BasicUsageGuide状态:Additionally,ifyouplantomakeuseoftheasynchronousAPIandyourequiretheTask.AsyncStatetohaveavalue,thiscanalsobespecified:intdatabaseNumber=...objectasyncState=...IDatabasedb=redis.GetDatabase(databaseNumber,as

redis - Stackexchange.Redis ConnectionMultiplexer.Connect() 在连接失败时什么都不做?

我尝试通过ConnectionMultiplexer.Connect("127.0.0.1");连接到我的Redis服务器实例,但是尽管没有服务器启动和运行,连接不会抛出错误也不会引发任何ConnectionFailed事件。我仔细检查过我没有任何独立实例,也没有运行Redis的Windows服务。如何检查连接是否成功?我在.Net4.5上运行并使用StackExchange.Redis版本4.0.30319谢谢 最佳答案 这可能应该记录为SE.Redis上的错误,而不是此处的问题。除非您已将AbortOnConnectFail显式

redis - Stackexchange.Redis ConnectionMultiplexer.Connect() 在连接失败时什么都不做?

我尝试通过ConnectionMultiplexer.Connect("127.0.0.1");连接到我的Redis服务器实例,但是尽管没有服务器启动和运行,连接不会抛出错误也不会引发任何ConnectionFailed事件。我仔细检查过我没有任何独立实例,也没有运行Redis的Windows服务。如何检查连接是否成功?我在.Net4.5上运行并使用StackExchange.Redis版本4.0.30319谢谢 最佳答案 这可能应该记录为SE.Redis上的错误,而不是此处的问题。除非您已将AbortOnConnectFail显式

c# - StackExchange.Redis 支持 ZPOP?

我想使用StackExchange.Redis为我的应用程序实现ZPOP。根据Redisdocumentation在WATCH部分,ZPOP可以通过以下命令实现:WATCHzsetelement=ZRANGEzset00MULTIZREMzsetelementEXEC在StackExchangeRedis中,这看起来像:varconnection=GetMultiplexer();vardb=connection.GetDatabase();vartrans=db.CreateTransaction();varelements=awaittrans.SortedSetRangeBySc

c# - StackExchange.Redis 支持 ZPOP?

我想使用StackExchange.Redis为我的应用程序实现ZPOP。根据Redisdocumentation在WATCH部分,ZPOP可以通过以下命令实现:WATCHzsetelement=ZRANGEzset00MULTIZREMzsetelementEXEC在StackExchangeRedis中,这看起来像:varconnection=GetMultiplexer();vardb=connection.GetDatabase();vartrans=db.CreateTransaction();varelements=awaittrans.SortedSetRangeBySc

c# - StackExchange.Redis 字符串值转换为set

我使用StackExchange.Redis来处理缓存。我有从缓存返回值的操作(如果值存在)publicActionResultGetCalculatorSalaries(){vars=(string)_cache.StringGet("CalculatorSalaries");if(String.IsNullOrEmpty(s)){varsalaries=_service.LoadCalculatorSalaries();_cache.SetAdd("CalculatorSalaries",(string)salaries);returnJson(salaries,JsonReque