Gap: Caching Strategy & Implementation
Status: 🔴 Not Started Priority: Important (Pre-Scale) Estimated Effort: 2 days
What's Missing
Comprehensive caching documentation including:
What to Cache
- Read-heavy data (form templates, custom fields, specialties)
- Computed data (timeslots, availability)
- Segment evaluations
- PDF generation results
Cache Keys
- Naming conventions
- Organization scoping
- Version prefixing
- Key structure patterns
Cache Invalidation
- Write-through vs. write-behind
- Event-driven invalidation
- TTL strategies
- Cascade invalidation (e.g., custom field → forms)
Implementation Patterns
- Repository-level caching
- Service-level caching
- HTTP response caching (ETag, Cache-Control)
- Cache-aside pattern
Redis Usage
- Current uses (holds, rate limiting)
- Planned caching uses
- Memory management
- Eviction policies
Why Important
- Performance - Reduce database load
- Scalability - Handle more users without scaling DB
- Cost - Reduce RDS costs
- User Experience - Faster response times
Current State
- Redis used for holds and rate limiting
- Timeslot caching mentioned (5 min TTL)
- No comprehensive caching strategy
Recommended Location
docs/architecture/caching.md
Success Criteria
- [ ] Cache candidates identified and prioritized
- [ ] Cache key patterns documented
- [ ] Invalidation strategies defined
- [ ] Redis memory limits calculated
- [ ] Implementation patterns documented