Cache Implementation in .NET 4.8
if (Cache["total_"+ userId] == null) { /* 30 minutes cache*/ Cache.Insert("total_" + userId , dc.Customers.Where(p => p.UserId == userId).Count() , null, DateTime.Now.AddMinutes(30), TimeSpan.Zero); } total = (int) Cache["tota...
May 30, 20231 min read21
