Chapter 7 of the story of the course, built before chapter 6. Outline: (1) why cache the catalog; (2) what you will build; (3) cache-aside and EventCache; (4) keys and time to live; (5) invalidation; (6) failure handling; (7) hit ratio math and measuring; (8) stampede and the lock; (9) other cures; (10) the simulator.
The story of the course (2027.1 overview, "The story of the course"): chapter 7 opens with the ~100x read ratio. Lab 4 measured the front door as cheap (a fraction of a ms to a few ms at p50), so the cost of a read is the database. The labs take chapter 7 before chapter 6.
With 60 s, the keys written early in the cold run expire early in the next one: each hot key misses about once per minute in both. A TTL longer than the run shows the warm cache win. Warm-ups before each run: the recreated replicas are cold JVMs.
The simulator sits at the end of step 5 of Cache-aside.