runtime-api subsystem lru cache (#2309)

* Add memory-lru cache to runtime-api

* Add cache.rs

* Adds MallocSizeOf

* Review nits

* Add a cached requests metric

* More review nits

* Some more review nits
This commit is contained in:
Fedor Sakharov
2021-01-26 18:51:10 +03:00
committed by GitHub
parent f3adf8b864
commit 5634d289ee
11 changed files with 525 additions and 39 deletions
+2
View File
@@ -10,6 +10,7 @@ edition = "2018"
# this crate for WASM. This is critical to avoid forcing all parachain WASM into implementing
# various unnecessary Substrate-specific endpoints.
parity-scale-codec = { version = "1.3.6", default-features = false, features = [ "derive" ] }
parity-util-mem = { version = "0.8.0", optional = true }
sp-std = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-runtime = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
sp-core = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
@@ -44,6 +45,7 @@ std = [
"sp-core/std",
"parking_lot",
"log",
"parity-util-mem",
"sp-externalities",
"sc-executor",
"sp-io",