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
@@ -25,6 +25,7 @@ trie = { package = "sp-trie", git = "https://github.com/paritytech/substrate", b
bitvec = { version = "0.17.4", default-features = false, features = ["alloc"] }
frame-system = { git = "https://github.com/paritytech/substrate", branch = "master", default-features = false }
hex-literal = "0.3.1"
parity-util-mem = { version = "0.8.0", default-features = false, optional = true }
[dev-dependencies]
sp-serializer = { git = "https://github.com/paritytech/substrate", branch = "master" }
@@ -48,6 +49,7 @@ std = [
"sp-arithmetic/std",
"runtime_primitives/std",
"serde",
"parity-util-mem",
"polkadot-parachain/std",
"polkadot-core-primitives/std",
"bitvec/std",