make cache pub (#418)
This commit is contained in:
parent
5de08da32c
commit
1d14338351
4 changed files with 5 additions and 5 deletions
2
src/cache/disk.rs
vendored
2
src/cache/disk.rs
vendored
|
|
@ -24,7 +24,7 @@ impl<T> Deref for CacheEntry<T> {
|
|||
/// 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<T: Serialize + DeserializeOwned, P: Serialize>(
|
||||
pub fn get<T: Serialize + DeserializeOwned, P: Serialize>(
|
||||
name: &str,
|
||||
params: &P,
|
||||
build_fn: fn(&P) -> T,
|
||||
|
|
|
|||
2
src/cache/mem.rs
vendored
2
src/cache/mem.rs
vendored
|
|
@ -28,7 +28,7 @@ impl<T> Deref for CacheEntry<T> {
|
|||
/// 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<T: Serialize + DeserializeOwned + Sync + 'static, P: Serialize>(
|
||||
pub fn get<T: Serialize + DeserializeOwned + Sync + 'static, P: Serialize>(
|
||||
name: &str,
|
||||
params: &P,
|
||||
build_fn: fn(&P) -> T,
|
||||
|
|
|
|||
4
src/cache/mod.rs
vendored
4
src/cache/mod.rs
vendored
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue