Black Friday Speed Is Built Weeks Before the Traffic
On sale day, thousands of shoppers ask for the same product pages. A cache answers them from memory instead of the database.
That is caching in one line: fetch once, serve the copy many times. A hit is fast. A miss goes to the database and stores a copy.
The risk is stale data. Give every copy an expiry, clear it when a price changes, and read stock live at payment.
Redis is the common tool for this, an in-memory data store. Redis 8 ships under RSALv2, SSPLv1 or AGPLv3.
Who owns cache rules on your team?
First comment (optional): Redis docs on eviction and cache hit rate: https://redis.io/docs/latest/develop/reference/eviction/