Skip to main content

set_segment_handle_cache

Function set_segment_handle_cache 

Source
pub fn set_segment_handle_cache(capacity: usize) -> TuningOverride
Expand description

Override the segment handle-cache capacity for tests (eviction tests need a tiny cache). Clamped to [SEGMENT_HANDLE_CACHE_MAX]. The capacity is read once at BlobStore::open, so set it before opening. Process-wide; the returned guard restores the default when dropped. The slot treats 0 as “use the default” (the same value the guard stores), so passing 0 yields SEGMENT_HANDLE_CACHE, not an empty cache.