From 3ff3e6fe396196cf06318a02f34d66b07e3b4297 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Standa=20Luke=C5=A1?= Date: Fri, 20 Dec 2024 21:27:35 +0100 Subject: [PATCH] v5 cleanup: Add IControlBuilderFactory.InvalidateCache method it has previously only been added to our default implementation for backwards compatibility reasons --- .../Framework/Compilation/DotvvmViewCompilationService.cs | 3 +-- src/Framework/Framework/Compilation/IControlBuilderFactory.cs | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/Framework/Framework/Compilation/DotvvmViewCompilationService.cs b/src/Framework/Framework/Compilation/DotvvmViewCompilationService.cs index 6d633f2c8a..318a6d132c 100644 --- a/src/Framework/Framework/Compilation/DotvvmViewCompilationService.cs +++ b/src/Framework/Framework/Compilation/DotvvmViewCompilationService.cs @@ -184,8 +184,7 @@ public bool BuildView(DotHtmlFileInfo file, bool forceRecompile, out DotHtmlFile try { if (forceRecompile) - // TODO: next major version - add method to interface - (controlBuilderFactory as DefaultControlBuilderFactory)?.InvalidateCache(file.VirtualPath); + controlBuilderFactory.InvalidateCache(file.VirtualPath); var pageBuilder = controlBuilderFactory.GetControlBuilder(file.VirtualPath); diff --git a/src/Framework/Framework/Compilation/IControlBuilderFactory.cs b/src/Framework/Framework/Compilation/IControlBuilderFactory.cs index 7fed27c911..6b9c658b4d 100644 --- a/src/Framework/Framework/Compilation/IControlBuilderFactory.cs +++ b/src/Framework/Framework/Compilation/IControlBuilderFactory.cs @@ -6,7 +6,6 @@ namespace DotVVM.Framework.Compilation public interface IControlBuilderFactory { (ControlBuilderDescriptor descriptor, Lazy builder) GetControlBuilder(string virtualPath); - // TODO: next major version - // void InvalidateCache(string virtualPath); + void InvalidateCache(string virtualPath); } }