Skip to content

Commit

Permalink
Merge pull request #321 from devgateway/feature/cache-v3
Browse files Browse the repository at this point in the history
#319 Fixed cache issue v3
  • Loading branch information
mpostelnicu authored Nov 10, 2020
2 parents 0562fc6 + 8b599aa commit 052b271
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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());
Expand Down

0 comments on commit 052b271

Please sign in to comment.