

Lesson 03 · 11 min
Caching: cache-aside, TTL and invalidation
How to serve hot data from memory without showing stale data.
11 minLesson 3 of 10Practice includedAsk AI on any point
A cache keeps a copy of data where it is faster to read. A read from memory takes hundreds of nanoseconds, a network call to Redis in the same data center takes up to a millisecond, and a heavy SQL query can take tens or hundreds of milliseconds. If 90% of requests read the same 10% of data, a cache takes most of the load off the database.
Sign in to continue
The rest of this lesson opens after sign up
The first lesson of every course is open without an account. To read on, solve the practice and use Ask, create a free account or log in.