1. Write-through vs write-back (write-behind): which statement is accurate?
Write-through persists to the database and updates the cache in the same flow, trading latency for freshness. Write-back queues DB persistence and can batch writes for speed, but risks data loss on cache failure without durable write logs.
writeThrough(k,v){ db.put(k,v); cache.set(k,v,ttl); }