Handling events and exceptions (Intermediate)

In this recipe, we will cover the following topics:

  • Reacting to the Ehcache Events model
  • Ehcache exception custom handling
  • Programmatic configuration through a proxy cache reference

In this recipe we show how Ehcache events and exceptions can be intercepted and contributed to our application behavior when errors/things happen. We will demonstrate current ways to configure caching for event handling purposes as well as advanced proxy cache configurations.

Getting ready

Ehcache events and exception handling can be configured in two ways: either declarative or programmatic. Depending on which one you choose you will need to add more code (declarative). In simple words, for overriding the Ehcache default event ...

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.