From e08ad288c48ab6fccd45bfb00da162daa69281b1 Mon Sep 17 00:00:00 2001 From: Martin Ek Date: Thu, 12 Apr 2018 16:20:27 +0200 Subject: [PATCH] Add disable_cache method --- src/db_options.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/db_options.rs b/src/db_options.rs index 716b6f7..7adc6ad 100644 --- a/src/db_options.rs +++ b/src/db_options.rs @@ -72,6 +72,12 @@ impl BlockBasedOptions { } } + pub fn disable_cache(&mut self) { + unsafe { + ffi::rocksdb_block_based_options_set_no_block_cache(self.inner, true as c_uchar); + } + } + pub fn set_bloom_filter(&mut self, bits_per_key: c_int, block_based: bool) { unsafe { let bloom = if block_based {