MVC Output Caching Expire After 1 Min

604 Views Asked by At

I've set an output cache for an Action as set out below. The cache duration is set for 3600 seconds, but the cache is refreshed every minute. Any help would be appreciated. Thank you.

        [OutputCache(Duration = 3600, Location = System.Web.UI.OutputCacheLocation.Any)]
        public ActionResult index()
        {
            var obj = db.tblAdvertisings.GroupBy(c => c.tblCategoryDetail.tblCategory.Category_Information).
                 OrderByDescending(c => c.Count()).
                 Select(c => new AdsCategory
                 {
                     count = c.Count(),
                     category = c.Key,
                     Id = c.FirstOrDefault().tblCategoryDetail.tblCategory.Category_Id,
                     categoryIcon = c.FirstOrDefault().tblCategoryDetail.tblCategory.Category_Icon
                 });
            ViewBag.time = DateTime.Now;
            return View(obj.ToList());
        }
0

There are 0 best solutions below