From 95bb4ba33ef939c0b1d5ca8d409b847b597193ff Mon Sep 17 00:00:00 2001 From: Octavian Ciubotaru Date: Tue, 13 Oct 2020 16:07:21 +0300 Subject: [PATCH] #319 Fixed cache issue --- .../toolkit/forms/wicket/FormsWebApplication.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/forms/src/main/java/org/devgateway/toolkit/forms/wicket/FormsWebApplication.java b/forms/src/main/java/org/devgateway/toolkit/forms/wicket/FormsWebApplication.java index 93f6ad8b..4ebe5532 100644 --- a/forms/src/main/java/org/devgateway/toolkit/forms/wicket/FormsWebApplication.java +++ b/forms/src/main/java/org/devgateway/toolkit/forms/wicket/FormsWebApplication.java @@ -158,9 +158,6 @@ private void optimizeForWebPerformance() { // -Dwicket.configuration=deployment // The default is Development, so this code is not used if (usesDeploymentConfig()) { - getResourceSettings().setCachingStrategy(new FilenameWithVersionResourceCachingStrategy("-v-", - new CachingResourceVersion(new Adler32ResourceVersion()) - )); getResourceSettings().setJavaScriptCompressor( new GoogleClosureJavaScriptCompressor(CompilationLevel.SIMPLE_OPTIMIZATIONS)); getResourceSettings().setCssCompressor(new YuiCssCompressor()); @@ -169,10 +166,11 @@ private void optimizeForWebPerformance() { getMarkupSettings().setStripComments(true); getMarkupSettings().setCompressWhitespace(true); getMarkupSettings().setStripWicketTags(true); - } else { - getResourceSettings().setCachingStrategy(new NoOpResourceCachingStrategy()); } + getResourceSettings().setCachingStrategy(new FilenameWithVersionResourceCachingStrategy("-v-", + new CachingResourceVersion(new Adler32ResourceVersion()))); + getRequestCycleSettings().setRenderStrategy(RenderStrategy.ONE_PASS_RENDER); // be sure that we have added Dozer Listener getRequestCycleListeners().add(new DozerRequestCycleListener());