Repository navigation
fix: bound verified certificate cache size - #304
visheshupadhyay wants to merge 2 commits into
Conversation
dxnnystyles
left a comment
There was a problem hiding this comment.
there's a small eviction edge case here. when the cache is already at capacity, refreshing an existing certificate chain still removes another entry before put replaces the existing key. checking whether the chain is already present before evicting would preserve that entry. it'd also be worth covering this case in the cache tests.
|
I’ve updated the cache insertion logic to skip eviction when the incoming certificate chain is already present, so a refresh replaces only that existing entry. I also added regression coverage that fills the cache to capacity, refreshes an existing chain, and verifies that the cache remains at 32 entries without removing any unrelated chain. The full test suite passes. |
dxnnystyles
left a comment
There was a problem hiding this comment.
thanks for the update! checked the revised eviction logic + regression test. refreshing an existing chain now leaves the other cached entries intact, and new insertions still respect the 32-entry limit. looks good 👍
Fixes #303