add lru cache conf

master
Jay Lee 9 years ago committed by Karl Hobley
parent e2c0877388
commit f92f15f111
  1. 9
      src/rocksdb_options.rs

@ -65,6 +65,15 @@ impl BlockBasedOptions {
size);
}
}
pub fn set_lru_cache(&mut self, size: size_t) {
let cache = rocksdb_ffi::new_cache(size);
unsafe {
// because cache is wrapped in shared_ptr, so we don't need to call
// rocksdb_cache_destroy explicitly.
rocksdb_ffi::rocksdb_block_based_options_set_block_cache(self.inner, cache);
}
}
}
impl Default for BlockBasedOptions {

Loading…
Cancel
Save