Memory Cache in ASP.NET Core — a practical guide to ASP.NET IMemoryCache with clear examples you can reuse in real projects.
ASP & ASP.NET Tutorial Series (201/247). Prefer one article? Read the complete ASP.NET tutorial.
Short description
Not shared across servers � use distributed cache in farms.
Memory cache
cache.Set("stats", stats, TimeSpan.FromMinutes(5));
var value = cache.Get<Stats>("stats");