(size_bytes: usize, level: CacheLevel)
| 53 | |
| 54 | impl CacheEntryMetadata { |
| 55 | pub fn new(size_bytes: usize, level: CacheLevel) -> Self { |
| 56 | let now = Instant::now(); |
| 57 | Self { |
| 58 | created_at: now, |
| 59 | last_accessed: now, |
| 60 | access_count: 0, |
| 61 | size_bytes, |
| 62 | ttl: None, |
| 63 | level, |
| 64 | tags: Vec::new(), |
| 65 | } |
| 66 | } |
| 67 | |
| 68 | pub fn with_ttl(mut self, ttl: Duration) -> Self { |
| 69 | self.ttl = Some(ttl); |
nothing calls this directly
no outgoing calls
no test coverage detected