redis
Installation
SKILL.md
Redis
Redis (Remote Dictionary Server) is an in-memory data structure store, used as a database, cache, and message broker. It is incredibly fast.
When to Use
- Caching: The #1 use case. Cache HTML, JSON, or DB results.
- Session Store: User sessions (speed + automatic expiry).
- Queues: Simple background job queues using Lists (
LPUSH/RPOP). - Real-time: Leaderboards, Counting, Pub/Sub.
Quick Start
# Set a value with 10 second expiry
SET session:123 "active" EX 10
# Increment a counter atomically
INCR page:views