Problem Statement
Which description correctly matches the Cache-Aside pattern?
Explanation
Cache-Aside keeps the cache as a read-through sidecar controlled by the application. It is simple and widely used because it avoids placing the cache on the write path.
Consistency relies on disciplined invalidation when underlying data changes.
Code Solution
SolutionRead Only
v = cache.get(k); if(!v){ v=db.get(k); cache.set(k,v,ttl);} return v;