We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc658f0 commit 566c573Copy full SHA for 566c573
GenericMemoryCache/MemoryCacheExtensions.cs
@@ -50,7 +50,7 @@ public static TValue GetOrCreate<TKey, TValue>(this IMemoryCache<TKey, TValue> c
50
Func<ICacheEntry<TKey, TValue>, TValue> factory)
51
{
52
TValue ObjectFactory(ICacheEntry entry)
53
- => factory(new CacheEntry<TKey, TValue>(entry));
+ => factory(entry.ToGeneric<TKey, TValue>());
54
55
return cache.Cache.GetOrCreate<TValue>(key, ObjectFactory);
56
}
0 commit comments