๐ค๏ธ Weather Caching Demos
Explore Redis distributed caching and real-time data strategies
๐ Choose a Demo
Three different strategies for handling data
๐ Quick Comparison
Key differences between the three strategies
| Feature | Page Cache | Controller Cache | Real-Time |
|---|---|---|---|
| What's Cached | Entire HTML page | API response data only | Nothing |
| Cache Duration | 60 seconds | 60 seconds | N/A |
| First Load | ~5 seconds | ~5 seconds | Instant |
| Cached Load | Instant | <500ms | Updates every 2s |
| Best For | High-traffic static pages | Expensive API calls | Live dashboards |
๐งช How to Test
What to expect with each demo
๐ Page Caching
First load: ~5 seconds. Refresh: instant (same HTML from Redis for 60 seconds).
๐ฏ Controller Caching
First API call: ~5 seconds. Next calls: <500ms (data from Redis for 60 seconds).
โก Real-Time
Automatic updates every 2 seconds. Always fresh data - no caching.
โน๏ธ About the 5-Second Delay
The API includes an artificial 5-second delay to simulate expensive operations (like database queries or external API calls). This makes the caching benefits easy to see.