Week 3: two paragraphs Β· about 20 minutes
A cache is a small, fast store that keeps copies of data you use often. Think of a kitchen. The fridge is the cache and the supermarket is the database. You keep milk in the fridge because walking to the shop every time would be slow.
But caches have a cost. The copy in the fridge can get old. If the shop changes the price of milk, your fridge does not know. Engineers call this stale data. So every cache needs a rule for when to throw old copies away. This rule is called eviction, and choosing it well is one of the hard parts of system design.
How. Read one sentence. Look up. Say it in your own words. Then go on. Keys: β next, β back, Esc to show all.
The fridge.
An old copy that no longer matches the source.
βοΈ Commonly misspelled work words (1)
Find the trap in each word and remember it.
Watch out. sep-A-rate (a rat in the middle), defin-I-tely, enviro-N-ment, argu-ment (no e).
Test yourself. The words hide. You hear a word, then type it.
π sh and ch
sh is a long, soft hush: shhh. ch starts with a stop, like t + sh: ch.
How. Press π, then say it 3 times. Record yourself on your phone and compare.
Say each word out loud. Then make your own sentence with it.
store
say: STOR
a place that keeps things
βThe cache is a fast store.β
copy
say: KOP-ee
something made to be the same as another
βKeep a copy of the file.β
stale
say: STAYL
old, not fresh
βThe page shows stale data.β
cost
say: KOST
what you lose or pay to get something
βSpeed has a cost.β
eviction
say: ih-VIK-shun
throwing something out of its place
βThe cache uses LRU eviction.β