use existing db cache size

This commit is contained in:
Jonathan de Jong 2021-07-15 13:47:21 +02:00
parent 661101c9ae
commit d76e95e8fc
2 changed files with 1 additions and 7 deletions

View file

@ -14,7 +14,7 @@ impl DatabaseEngine for Engine {
Ok(Arc::new(Engine(
sled::Config::default()
.path(&config.database_path)
.cache_capacity(config.sled_cache_capacity_bytes)
.cache_capacity((config.db_cache_capacity_mb * 1024.0 * 1024.0) as u64)
.use_compression(true)
.open()?,
)))