Databases
Cache
A fast, in-memory store that holds frequently accessed data so your app can skip slower database or API calls.
A cache keeps hot data in memory so your application can grab it in microseconds instead of hitting a slower database or external API every time. Redis is the dominant tool here, with Valkey as its open-source fork after Redis changed its license, and Memcached as the older lightweight option. Put a cache in front of an expensive query and response times can drop by an order of magnitude.
The uses go beyond raw speed. Caches hold user sessions, rate-limit counters, job queues, and computed results that would be wasteful to recalculate. Most VPS providers offer a managed Redis-compatible cache, and DigitalOcean's managed Redis starts around $15/mo for a small instance, saving you from running one yourself.
The discipline a cache demands is invalidation: deciding when cached data is stale and must be refreshed. Serve a user last hour's price because the cache never expired and you've traded a performance win for a correctness bug. Cache what's safe to be slightly old.