Local Cache
How It Works
Cache Entry Lifecycle
Configuration
Session.configure do |config|
config.cluster.local_cache_enabled = true
config.cluster.local_cache_ttl = 30.seconds
config.cluster.local_cache_max_size = 10_000
endTTL (Time-To-Live)
TTL Value
Use Case
Max Size and LRU Eviction
Cache Statistics
Understanding Hit Rate
Cache Invalidation
Automatic Invalidation
Manual Cache Operations
Thread Safety
Memory Management
Estimating Memory Usage
Monitoring Memory
Best Practices
1. Size Your Cache Appropriately
2. Set TTL Based on Session Update Frequency
3. Monitor Cache Performance
4. Consider Disabling for Specific Use Cases
Last updated
Was this helpful?