Primefaces p:cache
<p>I'm having some problem with Primefaces p:cache component</p>

<p>This is example how its used on <code>testpage/index.xhtml</code></p>

<pre><code>&lt;h:form&gt;
&lt;p:panel header="Testsite"&gt;
    &lt;p:cache region="testsite2"
        key="testsite2#{user.id}#{user.defaultLanguage}"&gt;
        &lt;p:commandButton action="#{testBean.hello}" value="btn" 
             rendered="#{testBean.renderedButton}"&gt;                 
        &lt;/p:commandButton&gt;
    &lt;/p:cache&gt;
&lt;/p:panel&gt;
&lt;/h:form&gt;
</code></pre>

<p>and this is back end bean</p>

<pre><code>@ManagedBean(name = "testBean")
@ViewScoped
public class TestBean {
    @PostConstruct
    public void init() {
        System.out.println("init");
    }
    public void hello() {
        System.out.println("hello");
    }  
    public boolean isRenderedButton() {
        System.out.println("isRenderedButton");
        return true;
    }
}
</code></pre>

<p>So on first page hit <code>init</code> and <code>isRenderedButton</code> message are printed normally as expected. After that when I click on button I do expect to see <code>hello</code> message printed, but that's not case here. Can anyone point me in right direction ?</p>

<p>According to <a href="http://www.primefaces.org/showcase/ui/misc/cache.xhtml" rel="nofollow">Primefaces showcase for p:cache</a> with buttons I was expecting this behavior.</p>

<p>Right now I am using <a href="https://github.com/primefaces/primefaces/blob/8a557adb2620f90747b2fad8e0850e36da27a29b/src/main/java/org/primefaces/context/DefaultApplicationContext.java#L75" rel="nofollow">Primefaces.DEFAULT_CHACHE_PROVIDER</a> and later I will switch to ehcache.</p>

<p>I'm using PF 5.3, sun faces 2.2.12.</p>

<p>Thanks.</p>