# Redis Analysis Examples

## Example 1: Caching Strategy

**Input:**
```
Design a caching strategy for user profile data with Redis.
```

**Expected Output:**
Hash structure for profiles, TTL strategy, cache-aside pattern, invalidation on updates, example commands with HSET/HGET, monitoring cache hit rate.

## Example 2: Leaderboard Implementation

**Input:**
```
Implement a real-time game leaderboard with millions of players.
```

**Expected Output:**
Sorted Set with ZADD for scores, ZREVRANGE for top players, ZRANK for individual rank, ZINCRBY for score updates, performance characteristics.

## Example 3: Rate Limiting

**Input:**
```
Implement rate limiting: 100 requests per minute per user.
```

**Expected Output:**
String counter with INCR, TTL for window reset, atomic operations, sliding window vs fixed window, example implementation, edge cases.

## Common Use Cases

- Cache design
- Real-time features
- Session management
- Rate limiting
- Queue implementation
