Ensure event handlers are unsubscribed in Core Components

This commit is contained in:
Shannon
2020-09-04 13:25:56 +10:00
parent 7b1f7ced3a
commit 1ab77adc8a
11 changed files with 203 additions and 86 deletions

View File

@@ -117,7 +117,13 @@ namespace Umbraco.Web.Search
}
public void Terminate()
{ }
{
ContentCacheRefresher.CacheUpdated -= ContentCacheRefresherUpdated;
ContentTypeCacheRefresher.CacheUpdated -= ContentTypeCacheRefresherUpdated;
MediaCacheRefresher.CacheUpdated -= MediaCacheRefresherUpdated;
MemberCacheRefresher.CacheUpdated -= MemberCacheRefresherUpdated;
LanguageCacheRefresher.CacheUpdated -= LanguageCacheRefresherUpdated;
}
[EditorBrowsable(EditorBrowsableState.Never)]
[Obsolete("This method should not be used and will be removed in future versions, rebuilding indexes can be done with the IndexRebuilder or the BackgroundIndexRebuilder")]