Does cache absolute expiration guarantee that the cache is eliminated at the exact time?
- by Fabio Milheiro
I am using the HttpRuntime cache to store lists of objects and in our current project it was specified that the objects should be cached until midnight, so I am using DateTime.Today.AddHours(24) in order to set the absolute expiration date to midnight.
For example, if today is May 26th, the absolute expiration time will be set to May 27th 0:00.
But somehow, when I change the clock of my computer, the objects are still in cache. Should I wait a little (the CacheItemPriority is set to Normal)? Am I forgetting something?
Thank you