Allow to disable CacheControlFilter headers #53

Closed
Janario opened this Issue Aug 25, 2014 · 3 comments

Projects

None yet

3 participants

@Janario
Janario commented Aug 25, 2014

Allow to disable cache headers. Sometimes running on development environment it's would be good to make sure cache is disabled.
It could be disabled when stage is Development:
javax.faces.PROJECT_STAGE=Development

or from an explicit init-param e.g.
< filter>
< filter-name>cache1week< /filter-name>
< filter-class>org.omnifaces.filter.CacheControlFilter< /filter-class>
< init-param>< param-name>expires< /param-name>< param-value>1w< /param-value>< /init-param>
< init-param>
< param-name>enabled< /param-name>
< param-value>${my.mvn.property}< /param-value>
< /init-param>
< /filter>

@Janario Janario changed the title from Allow to disable cache headers to Allow to disable CacheControlFilter headers Aug 25, 2014
@BalusC
Member
BalusC commented Sep 1, 2014

Not sure on this one. Just forcing hard refresh in browser (Ctrl+F5, etc) or reopening in an incognito tab/window should already do it. Web devs are generally already used to it.

@Janario
Janario commented Sep 24, 2014

Sorry for the delay

In development time it is good to test as fast as we can. Without any doubt if the resources are being cached.

It would be great to ensure that.

@filipenevola

+1 for is good to test as fast as we can

@BalusC BalusC closed this in 0fda95f Jan 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment