JBoss JSF page cache doesn’t always seem to be updated when I change my xhtml files. For example:
Template
<html xmlns="http://www.w3.org/1999/xhtml"
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:p="http://primefaces.prime.com.tr/ui"
xmlns:f="http://java.sun.com/jsf/core">
<f:view contentType="text/html">
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<meta http-equiv="pragma" content="no-cache"/>
<meta http-equiv="cache-control" content="no-cache"/>
<meta http-equiv="cache-control" content="must-revalidate"/>
<meta http-equiv="expires" content="-1"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
</h:head>
<h:body>
<ui:insert name="body"/>
</h:body>
</f:view>
</html>
MyPage.xhtml
<ui:composition template="template.xhtml">
<ui:define name="body">
<h:outputText value="Some text"/>
</ui:define>
</ui:composition>
If i load MyPage.jsf now, it will display “some text”. Now I change “some text” to “changed text” in the exploded package and reload the page. The page will display the new text. However, if I change it once more, it will still display the old value. The problem seem to come and go, but applies to all my pages when it does show itself. Every page only reflects changes once, then it seems to cache itself and won’t let go until I reload the application or wait a few minutes for the cache to invalidate itself. This is very annoying during development.
Is there any solution to this problem?
This seems related to when a xhtml compile error occurs, JBoss cache does not seem to be updated. Bug most likely.