Browse Source
Merge pull request #19998 from abpframework/rediscachefix
Fix AbpRedisCache.ConnectAsync
pull/19999/head
maliming
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
5 additions and
4 deletions
-
framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpRedisCache.cs
|
|
|
@ -76,14 +76,15 @@ public class AbpRedisCache : RedisCache, ICacheSupportsMultipleItems |
|
|
|
ConnectMethod.Invoke(this, Array.Empty<object>()); |
|
|
|
} |
|
|
|
|
|
|
|
protected virtual async Task ConnectAsync(CancellationToken token = default) |
|
|
|
protected virtual async ValueTask<IDatabase> ConnectAsync(CancellationToken token = default) |
|
|
|
{ |
|
|
|
if (GetRedisDatabase() != null) |
|
|
|
var redisDatabase = GetRedisDatabase(); |
|
|
|
if (redisDatabase != null) |
|
|
|
{ |
|
|
|
return; |
|
|
|
return redisDatabase; |
|
|
|
} |
|
|
|
|
|
|
|
await (Task)ConnectAsyncMethod.Invoke(this, new object[] { token })!; |
|
|
|
return await (ValueTask<IDatabase>)ConnectAsyncMethod.Invoke(this, new object[] { token })!; |
|
|
|
} |
|
|
|
|
|
|
|
public byte[]?[] GetMany( |
|
|
|
|