LazyCache
LazyCache copied to clipboard
GetOrAddAsync doesn't call GetOrCreateAsync in the provider
Trying to write a Redis provider for the current version of LazyCache. Ended up hitting a wall with the current implementation.
The bug When calling _cache.GetOrAddAsync() the caching service calls the GetOrCreate on the underlying provider instead of GetOrCreateAsync. This prevents the task from being unwrapped correctly and the resulting object is wrong.
CachingService.cs:172
and CachingService.cs:192
.
Couldn't find an easy way around it because of the way the CacheFactory is used, and passes the type as an object