Cache aside

In the cache aside strategy, the Apache Ignite cluster doesn't interact with the persistence storage; the application takes the responsibility to read data from the persistence storage and update the cache. First, the application looks up the cache for data if the data is available in the cache then returns it; otherwise, it goes to the persistence storage to fetch the data and updates the cache so that the next cache lookup can return the value from the cache. The following diagram represents the cache aside architecture:

The application updates the cache when any of the following happens:

  •  The cache lookup is missed and the application has to query the persistence storage
  • The application updates a persistence storage value
  • The application inserts a value into the persistence storage

The cache aside approach is very useful for fast data access, but forces us to write boilerplate code to maintain two data sources: the database and cache.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.139.83.199