当我更改我的xhtml文件时,似乎并不总是更新JBoss JSF页面缓存。例如:
模板
<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>
如果我现在加载MyPage.jsf,它将显示“some text”。现在我在爆炸包中将“some text”更改为“changed text”并重新加载页面。该页面将显示新文本。但是,如果我再次更改它,它仍将显示旧值。问题似乎来了又去,但是当它显示出来时适用于我的所有页面。每个页面只反映一次更改,然后它似乎缓存自身,并且在我重新加载应用程序或等待几分钟以使缓存无效之前不会放手。这在开发过程中非常烦人。
这个问题有解决办法吗?
答案 0 :(得分:0)
这似乎与发生xhtml编译错误时有关,JBoss缓存似乎没有更新。最有可能的错误。