Spring Cache Abstraction (Intermediate)

In this recipe, we will cover the following topics:

  • Including Ehcache in a Spring-based project
  • Declarative configuration through XML
  • Spring cache abstraction API details

We will examine how to configure Ehcache in Spring-based projects using the Cache Abstraction utility. This allows us to seamlessly integrate both technologies and give our projects enough flexibility to set up the cache in a nonintrusive way.

Getting ready

Ehcache can be easily integrated with the latest Spring Framework. Configuring it is a simple application context configuration and some custom annotated code for handling the cache requirements.

Note

Refer to the recipe3 project directory within the source code bundle for a fully working sample ...

Get Instant Effective Caching with Ehcache now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.