Skip to content

Commit

Permalink
Merge pull request #19998 from abpframework/rediscachefix
Browse files Browse the repository at this point in the history
Fix AbpRedisCache.ConnectAsync
  • Loading branch information
maliming committed Jun 10, 2024
2 parents ae722bd + ce5dc46 commit 0e1c057
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,15 @@ protected virtual void Connect()
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(
Expand Down

0 comments on commit 0e1c057

Please sign in to comment.