I’m studying Cache Read strategies.
I found two strategies are generally used.
- Look-Aside strategy.
- Read-Through strategy.
I understood difference of Look-Aside and Read-Through is “Who has Responsibility for Caching”.
Many articles are saying
A: “If use Read-Through strategy, Data consistency problems can be avoided by always synchronizing data between cache and DB.”
and
B: “With the Read-Through strategy, you will always get a cache miss the first time you request data.”
But, I can’t understand A and B.
I have two question.
-
Q1: In A, If there is data in the cache, it is returned as is. How can data consistency be guaranteed?
-
Q2: In B, Even with the Look-Aside strategy, doesn’t a cache miss occur when data is first requested?
I looked up cache writing strategies.
In this process, I understood the Write Back strategy, Write Through strategy, and Write Around strategy.
Kim daehyeon is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.