Commit 77dda2fb authored by Jay Lee's avatar Jay Lee

add lru cache conf

parent ab9214e8
......@@ -82,6 +82,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);
}
}
}
// TODO figure out how to create these in a Rusty way
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment