🗃️Redis
Also known as Redis Database
A store that keeps data in memory, under keys. That makes it very fast.
Think of it like
Think of it like a sticky note on your desk, not a file down in the cellar. It is right there when you need it.
Example
Jack's shop caches its home page product list in Redis for 60 seconds. The main database gets one query a minute instead of thousands.
Why it matters
Definition
Example code
console
$ redis-cli SET greeting "Hi Emma"
OK
$ redis-cli GET greeting
"Hi Emma"Common mistake
Key takeaways
- 1In memory. Extremely fast reads and writes.
- 2Keys can expire. Old data clears itself.
- 3In front of the database. A cache, not the main store.