diff --git a/src/cache/disk.rs b/src/cache/disk.rs index dcec44b..1253ff4 100644 --- a/src/cache/disk.rs +++ b/src/cache/disk.rs @@ -24,7 +24,7 @@ impl Deref for CacheEntry { /// Get the artifact named `name` from the disk cache. If it doesn't exist, it will be built by /// calling `build_fn` and stored. /// The artifact is indexed by git commit first and then by `params: P` second. -pub(crate) fn get( +pub fn get( name: &str, params: &P, build_fn: fn(&P) -> T, diff --git a/src/cache/mem.rs b/src/cache/mem.rs index af15b81..83ddaa2 100644 --- a/src/cache/mem.rs +++ b/src/cache/mem.rs @@ -28,7 +28,7 @@ impl Deref for CacheEntry { /// Get the artifact named `name` from the memory cache. If it doesn't exist, it will be built by /// calling `build_fn` and stored. /// The artifact is indexed by `params: P`. -pub(crate) fn get( +pub fn get( name: &str, params: &P, build_fn: fn(&P) -> T, diff --git a/src/cache/mod.rs b/src/cache/mod.rs index 26a1caa..bab780e 100644 --- a/src/cache/mod.rs +++ b/src/cache/mod.rs @@ -1,9 +1,9 @@ #[cfg(feature = "disk_cache")] mod disk; #[cfg(feature = "disk_cache")] -pub(crate) use disk::{get, CacheEntry}; +pub use disk::{get, CacheEntry}; #[cfg(feature = "mem_cache")] mod mem; #[cfg(feature = "mem_cache")] -pub(crate) use mem::{get, CacheEntry}; +pub use mem::{get, CacheEntry}; diff --git a/src/lib.rs b/src/lib.rs index 4b7de65..cc21288 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -5,7 +5,7 @@ #![feature(mapped_lock_guards)] pub mod backends; -mod cache; +pub mod cache; pub mod frontend; pub mod lang; pub mod middleware;