configurable cache size

This commit is contained in:
Nikolay Volf
2016-06-20 13:42:04 +03:00
parent bf6308312e
commit 7e452ab2e0
15 changed files with 88 additions and 19 deletions

View File

@@ -23,6 +23,8 @@ pub struct Config {
pub pref_cache_size: usize,
/// Maximum cache size in bytes.
pub max_cache_size: usize,
/// Backing db cache_size
pub db_cache_size: Option<usize>,
}
impl Default for Config {
@@ -30,6 +32,7 @@ impl Default for Config {
Config {
pref_cache_size: 1 << 14,
max_cache_size: 1 << 20,
db_cache_size: None,
}
}
}