Implementing the cache-aside programming pattern

Perhaps the most common caching pattern in use today is cache-aside. In this strategy, an application populates a cache lazily, as applications request data, and as the system runs, the cache client gradually populates the cache to contain most of the data that it refers to frequently.

In this pattern, the cache doesn't interact with the database; it is kept aside as a more scalable in-memory data store.

Note

Infinispan will always attempt to load data from CacheStore or CacheLoader. We are talking about a situation where the data comes from an external data store, such as a database.

Consider a simple Reference Data Service example, which will be used to store and retrieve reference data, as the meaning ...

Get Infinispan Data Grid Platform Definitive Guide now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.