use of org.apache.wicket.request.resource.caching.FilenameWithVersionResourceCachingStrategy in project wicket by apache.
the class CssUrlReplacerTest method newApplication.
@Override
protected WebApplication newApplication() {
return new MockApplication() {
@Override
protected void init() {
super.init();
getResourceSettings().setCachingStrategy(new FilenameWithVersionResourceCachingStrategy("=VER=", new MessageDigestResourceVersion()) {
@Override
public void decorateUrl(ResourceUrl url, IStaticCacheableResource resource) {
url.setFileName(url.getFileName() + DECORATION_SUFFIX);
}
});
}
@Override
public Session newSession(Request request, Response response) {
Session newSession = super.newSession(request, response);
newSession.setLocale(Locale.ROOT);
return newSession;
}
};
}
Aggregations