Skip to content

fix(util): expire LRU entries at their TTL deadline - #433

Open
pengbanban wants to merge 1 commit into
Conflux-Chain:mainfrom
pengbanban:my_feature
Open

pengbanban wants to merge 1 commit into
Conflux-Chain:mainfrom
pengbanban:my_feature

Conversation

@pengbanban

@pengbanban pengbanban commented Nov 8, 2026 •

Copy link
Copy Markdown

An LRU item is still returned as valid when the injected clock is exactly equal to expiresAt. Treat the deadline as expired, so the validity interval ends before that instant.

The deterministic clock test checks the instant immediately before expiry, equality through GetWithoutExp, refresh through GetOrUpdate, and eviction through Get. It does not depend on sleeping.


This change is Reviewable

Signed-off-by: pengbanban <pengqichugui@outlook.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant