O'Reilly logo

Infinispan Data Grid Platform Definitive Guide by Wagner Roberto dos Santos

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

Persisting data in Infinispan

Infinispan can use a CacheLoader interface to save the in-memory cache data to a persistent cache store, such as a database or text file. And during initialization, CacheLoader can pre-load the cache using data from the persistent cache store.

The following figure shows an Infinispan instance using a backend store:

Persisting data in Infinispan

The entries are fetched from the store lazily, when the get() operation can't find the value in the cache the cache loader enters in action. The object returned by CacheLoader will be stored into the cache and reused as a response to the get() request.

Once the entry is in the memory available for modifications, ...

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