O'Reilly logo

PrimeFaces Cookbook - Second Edition by Oleg Varaksin, Mert Çalışkan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Reducing page load time using content caching

Reducing the page load time can be done by caching the HTML content after initial rendering. PrimeFaces' cache component can be used to cache the content. It supports two providers that enable content management in a cache store. The first provider is for Ehcache (http://ehcache.org) and the second one for Hazelcast (http://hazelcast.com/products/hazelcast).

In this recipe, we will use Ehcache—an open source, standard-based cache used to boost performance, offload the database, and simplify scalability. We will explain how the cache component works in an example with a feed reader wrapped inside the p:cache tag.

Getting ready

The cache provider is configured via a context parameter in web.xml. The provider ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required