| 113 | pub(crate) use cache::LruCache; |
| 114 | |
| 115 | pub struct ChangeStore { |
| 116 | /// Path to the changes directory (`.atomic/changes/`) |
| 117 | pub(crate) changes_dir: PathBuf, |
| 118 | |
| 119 | /// LRU cache of recently accessed changes. |
| 120 | /// |
| 121 | /// We use `RwLock` for thread-safe interior mutability, allowing |
| 122 | /// concurrent read access while ensuring exclusive write access. |
| 123 | pub(crate) cache: RwLock<LruCache<Hash, Change>>, |
| 124 | } |
| 125 | |
| 126 | impl std::fmt::Debug for ChangeStore { |
| 127 | fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { |
no outgoing calls
no test coverage detected