feat: raise cache default to 100K entries, evict stalest instead of dropping

The 10K cap was too conservative — the blocklist alone holds 400K domains.
At ~100 bytes per wire entry, 100K entries is ~10MB.

When the cache is full and evict_expired doesn't free enough slots,
evict_stalest removes the entry with the least remaining TTL instead of
silently discarding the new insert.
This commit is contained in:
Razvan Dimescu
2026-04-12 19:23:28 +03:00
parent 05d5a5145f
commit 043a7e1ba5
3 changed files with 42 additions and 7 deletions

View File

@@ -302,7 +302,7 @@ impl Default for CacheConfig {
}
fn default_max_entries() -> usize {
10000
100_000
}
fn default_min_ttl() -> u32 {
60