O'Reilly logo

Instant Effective Caching with Ehcache by Daniel Wind

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

Caching web fragments (Intermediate)

In this recipe, we will cover the following topics:

  • What Fragment Caching is and its benefits for web projects
  • Integrating Fragment Caching using Ehcache and Servlet API

We will examine how to implement fragment caching by integrating Ehcache and the Servlet API. We will cache the header of a web page in order to demonstrate how caching can be achieved for sections of a web page or a full web page if needed.

Getting ready

Fragment Caching is a technique used to cache sections of your web page in order to provide speed and increase performance. It is useful when certain elements of the page change frequently or depend on a complicated state, while other parts do not change so often. The Ehcache library provides a ...

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