cache manager and clearing tracing cache (#1769)

* removed configure_cache method

* generic cache_manager struct

* fixed #1743, tracing caches are cleared

* removed deadlocks in garbage_collect, implemented HeapSizeOf for traces

* trace cache config

* fixed carbage typo
This commit is contained in:
Marek Kotewicz
2016-07-31 00:19:27 +02:00
committed by Gav Wood
parent b29329c3c5
commit bcf8cd6dc0
9 changed files with 193 additions and 92 deletions

View File

@@ -68,8 +68,10 @@ pub struct Config {
pub enabled: Switch,
/// Traces blooms configuration.
pub blooms: BloomConfig,
/// Database cache-size if not default
pub db_cache_size: Option<usize>,
/// Preferef cache-size.
pub pref_cache_size: usize,
/// Max cache-size.
pub max_cache_size: usize,
}
impl Default for Config {
@@ -80,7 +82,8 @@ impl Default for Config {
levels: 3,
elements_per_index: 16,
},
db_cache_size: None,
pref_cache_size: 15 * 1024 * 1024,
max_cache_size: 20 * 1024 * 1024,
}
}
}