Cache stampede: an interactive simulator

One popular cache key expires every 3 seconds and is slow to rebuild. Guess how many queries hit the database each time.