grip/
no_op_cache_store.rs1use std::path::Path;
6
7use crate::item_counts::ItemCounts;
8use crate::traits::cache_store::CacheStore;
9
10#[derive(Debug, Clone, Copy, Default)]
11pub struct NoOpCacheStore;
12
13impl NoOpCacheStore {
14 #[must_use]
15 pub const fn new() -> Self {
16 Self
17 }
18}
19
20impl CacheStore for NoOpCacheStore {
21 fn get(&self, _path: &Path) -> Option<ItemCounts> {
22 None
23 }
24
25 fn set(&self, _path: &Path, _source: &str, _counts: &ItemCounts) {}
26
27 fn flush(&self) {}
28}