• Settings
    • Locale
    • Change the locale of the datepicker, schedule and client side validation messages.

      Language
      English
      English
      English
      French
      German
      German
      German
      Italian
      Korean
      Spanish
      Catalan
      Dutch
      Portuguese
      Portuguese
      Arabic
      Arabic
      Bulgarian
      Bangla
      Bosnian
      Czech
      Greek
      Estonian
      Persian
      Finnish
      Danish
      Hindi
      Indonesian
      Icelandic
      Croatian
      Japanese
      Hungarian
      Hebrew
      Georgian
      Central Kurdish
      Khmer
      Kyrgyz
      Kazakh
      Lithuanian
      Latvian
      Malay
      Norwegian
      Polish
      Romanian
      Russian
      Slovak
      Slovenian
      Serbian
      Serbian
      Swedish
      Thai
      Turkish
      Ukrainian
      Uzbek
      Vietnamese
      Chinese
      Chinese
  • Resources

Cache

Cache component is used to reduce page load time by caching the content in a global cache after the initial rendering. Various cache providers are supported like ehcache and hazelcast. Showcase use actually this component to render source examples for every PrimeFaces components because parsing an xhtml file takes time, and since the rendering won't change during the whole lifecycle of the application, it's better to cache the content.

Cache Tag Documentation

Cache component is used to reduce page load time by caching the content after initial rendering.

NameTypeRequiredDefaultDescription
id String false generated Unique identifier of the component in a namingContainer.
rendered boolean false true Boolean value to specify the rendering of the component, when set to false component will not be rendered.
binding UIComponent false generated An EL expression referring to a server side UIComponent instance in a backing bean.
disabled boolean false false Disables caching.
key String false Client Id Unique id of the cache entry in region.
processEvents boolean false false When enabled, lifecycle events such as button actions are executed.
region String false View Id Unique id of the cache region.
Loading...
Tag DocumentationNew DocumentationNew Documentation
  • tabscode.xhtml demonstrate how to use cache component declaratively
  • ShowcaseUtil demonstrate how to use cache API programmatically

<p:tabView var="entry" value="#{value}" touchable="false">
<p:tab title="#{entry.title}" >
    <p:cache region="sources" key="#{entry}">
<pre class="line-numbers"><code class="language-#{entry.type}">
#{entry.value}

</code></pre>
    </p:cache>
</p:tab>

<f:facet name="static-tabs">
    <ui:insert />
</f:facet>
    </p:tabView>