go-generics-cache icon indicating copy to clipboard operation
go-generics-cache copied to clipboard

Refactor DeleteExpired for safer behavior

Open AxelPrel opened this issue 1 week ago • 2 comments

  • make sure that expManager queue is not empty before popping, which can happen if an explicit delete happens while DeleteExpired releases the lock.

  • evict() now returns shouldContinue instead of a shouldBreak to simplify the loop.

AxelPrel avatar Jun 27 '24 09:06 AxelPrel