What happens if the entry is getting updated? If I write data straight to the database, on subsequent get request I will not get a cache-miss, but cache-hit as there is such value behind the key, so I will be looking at the stale data.
This whole caching section needs a very good analysis, it is giving people wrong impressions.
Type your question above this line.
Course: https://www.educative.io/collection/5668639101419520/5649050225344512
Lesson: https://www.educative.io/collection/page/5668639101419520/5649050225344512/5643440998055936