Skip to content

Commit cfaee51

Browse files
committed
rename with_cache_size
1 parent 995d148 commit cfaee51

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/config.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ impl Config {
146146
/// Defaults to a block cache with 16 MiB of capacity
147147
/// shared between all partitions inside this keyspace.
148148
#[must_use]
149-
#[deprecated = "Use Config::with_cache_size instead"]
149+
#[deprecated = "Use Config::cache_size instead"]
150150
#[allow(deprecated)]
151151
pub fn block_cache(mut self, block_cache: Arc<crate::BlockCache>) -> Self {
152152
self.monkey_patch_cache_size += block_cache.capacity();
@@ -159,7 +159,7 @@ impl Config {
159159
/// Defaults to a block cache with 16 MiB of capacity
160160
/// shared between all partitions inside this keyspace.
161161
#[must_use]
162-
#[deprecated = "Use Config::with_cache_size instead"]
162+
#[deprecated = "Use Config::cache_size instead"]
163163
#[allow(deprecated)]
164164
pub fn blob_cache(mut self, blob_cache: Arc<crate::BlobCache>) -> Self {
165165
self.monkey_patch_cache_size += blob_cache.capacity();
@@ -168,7 +168,7 @@ impl Config {
168168

169169
/// Sets the cache capacity in bytes.
170170
#[must_use]
171-
pub fn with_cache_size(mut self, size_bytes: u64) -> Self {
171+
pub fn cache_size(mut self, size_bytes: u64) -> Self {
172172
self.monkey_patch_cache_size = 0;
173173
self.cache = Arc::new(Cache::with_capacity_bytes(size_bytes));
174174
self

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ pub use lsm_tree::{AnyTree, CompressionType, KvPair, Slice, TreeType, UserKey, U
173173
// TODO: remove in V3
174174

175175
/// Block cache that caches frequently read disk blocks
176-
#[deprecated = "Use Config::with_cache_size instead"]
176+
#[deprecated = "Use Config::cache_size instead"]
177177
pub struct BlockCache(u64);
178178

179179
#[allow(deprecated)]
@@ -192,7 +192,7 @@ impl BlockCache {
192192
}
193193

194194
/// Blob cache that caches frequently read blobs
195-
#[deprecated = "Use Config::with_cache_size instead"]
195+
#[deprecated = "Use Config::cache_size instead"]
196196
#[allow(deprecated)]
197197
pub struct BlobCache(BlockCache);
198198

0 commit comments

Comments
 (0)