Session Cache
Overview
In-memory cache storing user sessions, temporary authentication tokens, and frequently accessed patient data for performance optimization.
Cache Strategy
- User Sessions: Active provider and patient portal sessions
- TTL: 15 minutes idle timeout
- Data: User ID, roles, permissions, last activity
- Security: Automatic invalidation on logout or password change
- Patient Demographics: Frequently accessed patient info
- Provider Schedules: Appointment availability
- Cache Invalidation: Event-driven updates
- TTL: 5 minutes for patient data, 1 minute for schedules
Technical Details
Specifications:
- Version: Redis 7.x
- Mode: Cluster mode with 3 shards
- Memory: 64 GB per node
- Replication: Multi-AZ with automatic failover
- Eviction Policy: LRU (Least Recently Used)
Performance:
- Latency: P99 < 5ms
- Throughput: 100,000 ops/sec
- Hit Rate: Target > 85%
⚡ Cache Warming
Critical patient data is pre-loaded into cache during off-peak hours to ensure fast morning clinic access.
Access Patterns
- Patient Portal Service: Read/Write user sessions
- EHR Service: Cache patient demographics for quick lookup
- Appointment Service: Cache provider availability