abp icon indicating copy to clipboard operation
abp copied to clipboard

AbpCachingStackExchangeRedisModule not working

Open ArcherTrister opened this issue 4 years ago • 8 comments

  • ABP Framework Version: 5.1.4
  • User Interface:Angular
  • Database Provider: EF Core

I followed official doc I configured redis, in appsettings.json like "Redis": { "IsEnabled": "true", "Configuration": "server ip,password=*******" } and add nuget package Volo.Abp.Caching.StackExchangeRedis into my module.

1111

I use IDistributedCache interface to set/get value from redis, but I get null and the error. Could you help me?

ERR Error running script (call to f_3915ee22fda531a1d5661f2523d0443fd35ff0a4): @user_script:2: @user_script: 2: Wrong number of args calling Redis command From Lua script
StackExchange.Redis.RedisServerException: ERR Error running script (call to f_3915ee22fda531a1d5661f2523d0443fd35ff0a4): @user_script:2: @user_script: 2: Wrong number of args calling Redis command From Lua script
   at Microsoft.Extensions.Caching.StackExchangeRedis.RedisCache.SetAsync(String key, Byte[] value, DistributedCacheEntryOptions options, CancellationToken token)
   at Volo.Abp.Caching.DistributedCache`2.<>c__DisplayClass51_0.<<SetAsync>g__SetRealCache|0>d.MoveNext()

ArcherTrister avatar Mar 30 '22 01:03 ArcherTrister

What Redis version are you using?

Please provide full steps to reproduce, thanks.

realLiangshiwei avatar Mar 30 '22 01:03 realLiangshiwei

Also, can you try using a simple project without ABP to test?

realLiangshiwei avatar Mar 30 '22 01:03 realLiangshiwei

I also encountered this problem. Can you solve this problem ?

wangyue20075 avatar Mar 30 '22 03:03 wangyue20075

Also, can you try using a simple project without ABP to test?

Yes, I've already done it and it works

simple project: RedisCache

abp project: AbpRedisCache

ArcherTrister avatar Mar 30 '22 03:03 ArcherTrister

What Redis version are you using?

Please provide full steps to reproduce, thanks.

@realLiangshiwei

Redis version: image image

ArcherTrister avatar Mar 30 '22 03:03 ArcherTrister

Please use the latest version of Redis

realLiangshiwei avatar Mar 30 '22 03:03 realLiangshiwei

Please use the latest version of Redis

thanks you, when i use redis6, it's ok

ArcherTrister avatar Mar 30 '22 05:03 ArcherTrister

This is a problem with the Windows version redis . Linux is ok , thanks !

wangyue20075 avatar Mar 31 '22 01:03 wangyue20075