Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

.NET Framework 4.7: Caches using absolute expiration might expire earlier or later than expected

Found in

EPiServer.CMS.Core 7.0.586.0

Fixed in

EPiServer.CMS.Core 10.10.2

(Or a related package)

Created

Jul 05, 2017

Updated

Aug 14, 2017

Area

CMS Core

State

Closed, Fixed and tested


Description

The built-in cache manager in Episerver uses DateTime.Now (rather than DateTime.UtcNow), because of a bug in .NET Framwork this is no longer supported and the local time will be treated as an UTC time instead. ISynschronizedObjectInstanceCache is with this fix changed to use DateTime.UtcNow to avoid this bug in .NET (per recommendation in MSDN https://msdn.microsoft.com/en-us/library/4y13wyk9(v=vs.110).aspx).

Bug in .NET Framework 4.7: https://support.microsoft.com/en-us/help/4035412/fix-expiration-time-issue-when-you-insert-items-by-using-the-cache-ins
Workaround: Apply .NET Framework 4.7.1 (not released yet as of writing this): https://github.com/Microsoft/dotnet/blob/master/releases/net471/dotnet471-changes.md