(&self)
| 147 | } |
| 148 | |
| 149 | fn stats_summary(&self) -> String { |
| 150 | let stats = self.stats(); |
| 151 | format!("entries: {}, size: {} bytes, hit_rate: {:.2}%", |
| 152 | stats.total_entries, |
| 153 | stats.total_size_bytes, |
| 154 | stats.hit_rate() * 100.0) |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | /// Memory-aware cache manager |