Updates to MemoryCache in .NET 9 Preview 1

Introduction In .NET 9 Preview 1, a new Keys property has been added to MemoryCache, allowing retrieval of cache keys. Additionally, a new overload of GetOrCreate (and its async counterpart) now accepts a MemoryCacheEntryOptions parameter. Sample Usage Keys Sample New API: public class MemoryCache { public System.Collections.Generic.IEnumer ...

Posted on Sat, 03 Oct 2026 16:30:52 +0000 by SoreE yes