How to Cache Dependencies in GitHub Actions

A workflow that runs npm ci on every push downloads the same few hundred packages from the registry each time, even when the lockfile hasn鈥檛 changed in a week. On a project with a real dependency tree that鈥檚 a minute or two gone before the first test starts, and you pay it again on every push and every pull request. actions/cache keeps those downloads between runs and hands them back when nothing relevant has changed. ...

September 23, 2026 路 6 min 路 1167 words 路 SpaghettiCoder

What Is a CDN and How It Works

What a CDN actually does to a request A user in Tokyo loading a page hosted on a server in Virginia pays for that distance twice: once for the request to arrive, once for the response to come back. Fiber runs at a fixed fraction of the speed of light, and that trip alone costs on the order of 150-200ms round-trip before the origin has done any work. Add a database query and a slow hop or two, and a page that feels instant next door feels sluggish on the other side of the planet. ...

September 16, 2026 路 7 min 路 1355 words 路 SpaghettiCoder

How Redis Caching Works and How to Use It

A query that takes 200ms against your database still takes 200ms the millionth time someone runs it, and every one of those runs competes for the same connections, disk I/O, and CPU. Redis keeps the answer in memory, on a server that does nothing else, so the millionth read costs a network round trip instead of a query plan. What Redis actually does as a cache Redis is an in-memory key-value store. Values live in RAM, so reads and writes measure in sub-millisecond time instead of the tens or hundreds of milliseconds a relational query costs once you add joins, indexes under pressure, or a busy connection pool. It sits next to your database, not in place of it: your application asks Redis first and goes to the database only when Redis doesn鈥檛 have the answer. ...

September 15, 2026 路 7 min 路 1382 words 路 SpaghettiCoder