1

According to this doc, Microsoft.Extensions.Caching.Memory is recommended over System.Runtime.Caching/MemoryCache.

System.Runtime.Caching/MemoryCache is thread safe as metioned here. But is Microsoft.Extensions.Caching.Memory also thread safe?

I couldn't find and doc says it's thread safe.

I looked into the source code. It is a wrapper around ConcurrentDictionary. Can I consider it thread safe? https://github.com/aspnet/Caching/blob/master/src/Microsoft.Extensions.Caching.Memory/MemoryCache.cs

1

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.