diff --git a/src/Umbraco.Web/PublishedContentQuery.cs b/src/Umbraco.Web/PublishedContentQuery.cs index 4a36f1b3a4..e865f13121 100644 --- a/src/Umbraco.Web/PublishedContentQuery.cs +++ b/src/Umbraco.Web/PublishedContentQuery.cs @@ -227,13 +227,10 @@ namespace Umbraco.Web return doc; } - private static ConcurrentDictionary _guidToIntLoopkup; + private static readonly ConcurrentDictionary _guidToIntLoopkup = new ConcurrentDictionary(); private IPublishedContent TypedDocumentById(Guid id, ContextualPublishedCache cache) { - // We create the lookup when we first need it - if (_guidToIntLoopkup == null) - _guidToIntLoopkup = new ConcurrentDictionary(); IPublishedContent doc;