Does cache absolute expiration guarantee that the cache is eliminated at the exact time?

Posted by Fabio Milheiro on Stack Overflow See other posts from Stack Overflow or by Fabio Milheiro
Published on 2010-05-26T11:42:39Z Indexed on 2010/05/26 11:51 UTC
Read the original article Hit count: 232

Filed under:
|

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

© Stack Overflow or respective owner

Related posts about c#

Related posts about cache