public void ClearCache(Type[]?changedTypes) { // Update the RazorCompiledItemFeatureProvider cache before the DefaultViewCompiler's cache is cleared. _razorCompiledItemFeatureProvider?.UpdateCache(changedTypes); _defaultViewCompiler?.ClearCache(); _razorViewEngine?.ClearCache(); _razorPageActivator?.ClearCache(); _defaultTagHelperFactory?.ClearCache(); _tagHelperComponentPropertyActivator?.ClearCache(); }