0 Replies Latest reply on Aug 21, 2009 1:01 AM by Guilherme Figueiredo

    s:cache ignored on ajax requests

    Guilherme Figueiredo Newbie


      I have a simple page that has a table with the results of a query (EntityQuery). I've put this table inside an s:cache to avoid query re-execution on every request. This works fine, and the query is executed only once with multiple reloads to the page.

      But if I have an AJAX request on that page, like on the code sample below, s:cache seems to have no effect and the query is executed on every ajax request, decreasing page performance.

             <h:form id="f">
                  <a4j:commandLink id="lk">
                      Ajax Link
              <s:cache key="users">
                   <h:dataTable id="dt" value="#{userList.resultList}" var="user">
                           <f:facet name="header">Login</f:facet>
                           <f:facet name="header">Name</f:facet>

      Removing the form that surrounds Ajax Link is not a solution because I need to call an action from that link.

      My TreeCache is configured just like the Seam blog example..

      Am I doing something wrong ?