abp icon indicating copy to clipboard operation
abp copied to clipboard

AbpRedisCache.ConnectAsync will throw InvalidCastException

Open cdlian opened this issue 2 years ago • 0 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

Since ASP.NET Core 8.0, the return value of the ConnectAsync method in RedisCache has been changed to ValueTask. In AbpRedisCache, calling this method by reflection and forcing the return value type to Task will cause a type conversion exception.

https://github.com/dotnet/aspnetcore/blob/v8.0.0/src/Caching/StackExchangeRedis/src/RedisCache.cs#L286

https://github.com/abpframework/abp/blob/rel-8.0/framework/src/Volo.Abp.Caching.StackExchangeRedis/Volo/Abp/Caching/StackExchangeRedis/AbpRedisCache.cs#L86

image

Reproduction Steps

No response

Expected behavior

No response

Actual behavior

No response

Regression?

No response

Known Workarounds

No response

Version

8.0.0

User Interface

Common (Default)

Database Provider

EF Core (Default)

Tiered or separate authentication server

None (Default)

Operation System

Windows (Default)

Other information

No response

cdlian avatar Jun 06 '24 03:06 cdlian