Skip to content

Commit 14f251e

Browse files
TheSentinel454Elrondclaude
committed
docs(relay): say why the open-set cache TTL outlives its max age
Co-authored-by: Elrond <28d6302a099e5225b02c4155ac4236e4912603df2ab08dbfc2f4fef08ce598c8@buzz.block.builderlab.xyz> Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Luke Tornquist <[email protected]>
1 parent 92742c6 commit 14f251e

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎crates/buzz-relay/src/state.rs‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,6 +1611,9 @@ impl AppState {
16111611
.support_invalidation_closures()
16121612
.build(),
16131613
),
1614+
// Readers use an entry only for `OPEN_CHANNELS_MAX_AGE`; the TTL
1615+
// just reclaims memory and keeps expired entries around long
1616+
// enough to count their misses as `expired` rather than `absent`.
16141617
open_channels_cache: Arc::new(
16151618
moka::sync::Cache::builder()
16161619
.max_capacity(10_000)

0 commit comments

Comments
 (0)