Skip to content

Commit 856199d

Browse files
committed
doc: add documents for admission picker
1 parent 95f7628 commit 856199d

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Admission Picker
2+
3+
## What is the admission picker?
4+
5+
The admission picker is used to determine whether the entry should be inserted
6+
into the disk cache. It is a component of the hybrid cache.
7+
8+
You can use it when you create a hybrid cache. For example:
9+
10+
```rust
11+
let hybrid: HybridCache<u64, String> = HybridCacheBuilder::new()
12+
.memory(64 * 1024 * 1024)
13+
.storage(Engine::Large)
14+
.with_admission_picker(Arc::new(RateLimitPicker::new(100 * 1024 * 1024)))
15+
.build()
16+
.await?;
17+
```
18+
19+
## Admission types
20+
21+
### RateLimitPicker

0 commit comments

Comments
 (0)