Read-through and write-through

In the read-through and write-through strategy, the application doesn't talk to the persistence storage, it interacts with the cache. The cache is responsible for updating the persistence storage.

Read-through is when the application needs a value, it looks it up in the cache; if the value is present in the cache, then that value is returned; otherwise, the cache looks up the persistence storage, updates the cache, and returns the value.

Write-through is when the application needs to update a value, it updates the cache and the cache updates the persistence storage. The write performance is slow as the writing thread waits for the persistence storage and cache updates:

Read-through and write-through offer the flexibility to work with the cache only. The application doesn't need to worry about maintaining two data sources. The cache maintenance overhead of the cache aside strategy is no longer needed for read-through and write-through.

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

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