0 votes
in Technology by (1.7m points)
What are Types of Caching?

1 Answer

0 votes
by (1.7m points)
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.