Return a copy of this cache with the same state but new kv table.
(&self)
| 239 | |
| 240 | /// Return a copy of this cache with the same state but new kv table. |
| 241 | pub fn as_new(&self) -> Self { |
| 242 | let mut copy = self.clone(); |
| 243 | copy.clear(); |
| 244 | copy |
| 245 | } |
| 246 | |
| 247 | /// Clear the cache. |
| 248 | pub fn clear(&mut self) { |