IMemoryCache: Immutable Collections and Unit Tests

How to create an immutable collection of cache objects and how to unit test IMemoryCache

Changhui Xu
codeburst
Published in
4 min readFeb 3, 2021

--

Caching is a common technique to reduce the number of trips for fetching data that seldom changes. Thus we can take advantage of caching to boost our application’s performance. ASP.NET Core provides several caching libraries…

--

--

Lead Application Developer. MBA. I write blogs about .NET, Angular, JavaScript/TypeScript, Docker, AWS, DDD, and many others.