diff --git a/include/ircd/db/database/descriptor.h b/include/ircd/db/database/descriptor.h index 49409376f..e3dcb9ca6 100644 --- a/include/ircd/db/database/descriptor.h +++ b/include/ircd/db/database/descriptor.h @@ -39,10 +39,10 @@ struct ircd::db::database::descriptor db::prefix_transform prefix {}; /// Size of the LRU cache for uncompressed blocks - size_t cache_size { 16_MiB }; + ssize_t cache_size { -1 }; /// Size of the LRU cache for compressed blocks - size_t cache_size_comp { 8_MiB }; + ssize_t cache_size_comp { -1 }; /// Bloom filter bits. Filter is still useful even if queries are expected /// to always hit on this column; see `expect_queries_hit` option. diff --git a/ircd/db.cc b/ircd/db.cc index c42672f77..1af716701 100644 --- a/ircd/db.cc +++ b/ircd/db.cc @@ -1370,13 +1370,13 @@ ircd::db::database::column::column(database *const &d, // Setup the cache for assets. const auto &cache_size(this->descriptor.cache_size); - if(cache_size) - table_opts.block_cache = rocksdb::NewLRUCache(cache_size); + if(cache_size != 0) + table_opts.block_cache = std::make_shared(d, cache_size); // Setup the cache for compressed assets. const auto &cache_size_comp(this->descriptor.cache_size_comp); - if(cache_size_comp) - table_opts.block_cache_compressed = rocksdb::NewLRUCache(cache_size_comp); + if(cache_size_comp != 0) + table_opts.block_cache_compressed = std::make_shared(d, cache_size_comp); // Setup the bloom filter. const auto &bloom_bits(this->descriptor.bloom_bits);