Create configuration optimized for read-heavy workloads
()
| 140 | impl CacheConfig { |
| 141 | /// Create configuration optimized for read-heavy workloads |
| 142 | pub fn read_optimized() -> Self { |
| 143 | Self { |
| 144 | l1_config: LevelConfig { |
| 145 | max_entries: 2000, |
| 146 | default_ttl: Some(Duration::from_secs(600)), // 10 minutes |
| 147 | ..Self::default().l1_config |
| 148 | }, |
| 149 | l2_config: LevelConfig { |
| 150 | max_entries: 10000, |
| 151 | default_ttl: Some(Duration::from_secs(3600)), // 1 hour |
| 152 | ..Self::default().l2_config |
| 153 | }, |
| 154 | ..Self::default() |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /// Create configuration optimized for write-heavy workloads |
| 159 | pub fn write_optimized() -> Self { |
nothing calls this directly
no outgoing calls
no test coverage detected