-
1. Re: How to configure the HTTP Cache-Control for static files?
ctomc Jan 12, 2015 7:42 AM (in response to optech)Where is your static content? in deployment?
-
2. Re: How to configure the HTTP Cache-Control for static files?
optech Jan 12, 2015 8:01 AM (in response to ctomc)Hi Tomaz,
yes they are in the war file (deployment)...
-
3. Re: How to configure the HTTP Cache-Control for static files?
optech Jan 12, 2015 10:24 AM (in response to optech)Sorry, I found the problem.
Before I configure the standalone.xml, I've tried a Java Class AccessControlInterceptor,
which implements ContainerResponseFilter, the method filter() was overridden with:
responseContext.getHeaders().add("Cache-Control", "no-cache");
it works only for the Java parts, but not for direct static files. After the I tried the configurations.
Today, I've just delete it to clean my workspace, then I noticed alter, the config in standalone.xml for filter works for all
So the configuration directly in standalone.xml for global is correct.
Nevertheless, is it possible that I can configure the Cache-Control in Java for all (include static files)?
(so I can configure compute the checksum or give a timestamp for ETAG... )
Thank you!