Quote Originally Posted by gep13 View Post
Hello Ben,

Did this work out for you, or are you still having issues?

Thanks

Gary
Hey gep, sorry for the late response. Well, good news is that it is now expiring. I had to change it to this:
Code:
Cache.Insert("SqlSource", dv2, sqlDep, System.DateTime.UtcNow.Add(new TimeSpan(0,0,60)), System.Web.Caching.Cache.NoSlidingExpiration); //the 4th parameter had to be a DateTime type
So the above code basically causes the cache to expire. Bad news is, it is always expiring regardless of whether or not I make changes to the table.

Basically what I am trying to accomplish (using the methods above) is that when there are no changes to the result based on the select command, it should not expire. If there are changes, then it should expire on the given datetime/timespan.