diff --git a/util/memory_cache/Cargo.toml b/util/memory_cache/Cargo.toml new file mode 100644 index 000000000..9179b3c8a --- /dev/null +++ b/util/memory_cache/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "memory_cache" +version = "0.1.0" +authors = ["Parity Technologies "] +description = "An LRU-cache which operates on memory used" +license = "GPL3" + +[dependencies] +heapsize = "0.4" +lru-cache = "0.1" diff --git a/util/src/cache.rs b/util/memory_cache/src/lib.rs similarity index 98% rename from util/src/cache.rs rename to util/memory_cache/src/lib.rs index e6f204192..af70b0cff 100644 --- a/util/src/cache.rs +++ b/util/memory_cache/src/lib.rs @@ -18,6 +18,9 @@ //! crate. // TODO: push changes upstream in a clean way. +extern crate heapsize; +extern crate lru_cache; + use heapsize::HeapSizeOf; use lru_cache::LruCache; diff --git a/util/src/lib.rs b/util/src/lib.rs index 863f811c4..7de3c4b39 100644 --- a/util/src/lib.rs +++ b/util/src/lib.rs @@ -116,7 +116,6 @@ extern crate log as rlog; pub mod misc; pub mod overlaydb; pub mod journaldb; -pub mod cache; pub use misc::*; pub use hashdb::*;