Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Symptoms

Assume that you have Microsoft .NET Framework 4.7 installed on a computer. When you try to insert items into the Cache object by using the Cache.Insert (string, object, CacheDependency, DateTime, TimeSpan) Insert overload method, you may notice that the inserted Cache items expire much earlier or later than the specified DateTime (expiration time).

Cause

The internal implementation of System.Web.Caching.Cache uses Coordinated Universal Time (UTC) time-stamp for absolute expiration. But this particular Cache.Insert (string, object, CacheDependecy, DateTime, TimeSpan) Insert overload method does not make sure whether the expiration time is converted to UTC. Therefore, expiration for items that are inserted into the Cache object by using this overload will occur earlier or later than expected, depending on the computer time zone difference from Greenwich Mean Time (GMT).

Workaround

The temporary workaround for this issue is to use either the Cache.Add method or a different Cache.Insert overload method.

Resolution

This issue will be fixed in the next version of the .NET Framework, and will also be available in the next hotfix for the .NET Framework 4.7.

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×