+ if (g_conf->rocksdb_cache_type == "lru") {
+ bbt_opts.block_cache = rocksdb::NewLRUCache(
+ block_cache_size,
+ g_conf->rocksdb_cache_shard_bits);
+ } else if (g_conf->rocksdb_cache_type == "clock") {
+ bbt_opts.block_cache = rocksdb::NewClockCache(
+ block_cache_size,
+ g_conf->rocksdb_cache_shard_bits);
+ } else {
+ derr << "unrecognized rocksdb_cache_type '" << g_conf->rocksdb_cache_type
+ << "'" << dendl;
+ return -EINVAL;
+ }