Please log in or register to answer this question.

1 Answer

0 votes

Application is responsible for reading and writing from the DB and the cache doesn’t interact with the DB at all. The cache is kept aside as a faster and more scalable in-memory data store. The application checks the cache before reading anything from the database and updates the cache after making any updates to the database. Thus the application ensures that the cache is kept synchronized with the database. Application treats cache as the main data store and reads data from it and writes data to it. The cache is responsible for reading and writing this data to the database, thereby relieving the application of this responsibility. Read-through/Write-through is ideal for reference data that is meant to be kept in the cache for frequent reads even though this data changes periodically.

Related questions