I am using cache.insert()
method to add some data to cache, and it uses absolute expiration and expires once in 4 hours.
Now I have a new requirement to expire the cache in specific times: 7am, 11am, 3pm, 7pm.
Is there a way to do it?
Current code:
ctx.Cache.Insert("stmodel", stModel, null,
DateTime.Now.AddHours(4), System.Web.Caching.Cache.NoSlidingExpiration, System.Web.Caching.CacheItemPriority.Default, OnCachedItemRemoved);
Thanks in advance.