Skip to content

Commit 4c78946

Browse files
authored
refactor: expose in-memory and disk cache API (#1096)
1 parent 80b04d0 commit 4c78946

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

foyer/src/hybrid/cache.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -526,6 +526,11 @@ where
526526
&self.inner.memory
527527
}
528528

529+
/// Access the disk cache.
530+
pub fn storage(&self) -> &Store<K, V, S, HybridCacheProperties> {
531+
&self.inner.storage
532+
}
533+
529534
/// Enable tracing.
530535
#[cfg(feature = "tracing")]
531536
pub fn enable_tracing(&self) {
@@ -847,10 +852,6 @@ where
847852
self.inner.storage.is_enabled()
848853
}
849854

850-
pub(crate) fn storage(&self) -> &Store<K, V, S, HybridCacheProperties> {
851-
&self.inner.storage
852-
}
853-
854855
pub(crate) fn metrics(&self) -> &Arc<Metrics> {
855856
&self.inner.metrics
856857
}

0 commit comments

Comments
 (0)