Skip to content

Commit d22dbb4

Browse files
Shazwazzanul800sebastiaan
authored andcommitted
Fixes U4-2734 Don't set the cache references to null when disposing the UmbracoContext
1 parent 4d5a829 commit d22dbb4

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

src/Umbraco.Web/UmbracoContext.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,14 @@ protected override void DisposeResources()
370370
_umbracoContext = null;
371371
//ensure not to dispose this!
372372
Application = null;
373-
ContentCache = null;
374-
MediaCache = null;
373+
374+
//Before we set these to null but in fact these are application lifespan singletons so
375+
//there's no reason we need to set them to null and this also caused a problem with packages
376+
//trying to access the cache properties on RequestEnd.
377+
//http://issues.umbraco.org/issue/U4-2734
378+
//http://our.umbraco.org/projects/developer-tools/301-url-tracker/version-2/44327-Issues-with-URL-Tracker-in-614
379+
//ContentCache = null;
380+
//MediaCache = null;
375381
}
376382
}
377383
}

0 commit comments

Comments
 (0)