Commit Graph
1 Commits
Author SHA1 Message Date
zeekay 9502dbf6e9 fix: invoke the LRU eviction callback
NewLRUCacheWithOnEvict accepted an onEvict func and discarded it: the struct
held no such field and Put never called it, so every caller passing a callback
got silence. Store it and call it on capacity eviction. The root package had no
tests; these cover the callback, LRU recency, and the nil-callback path.
2026-08-21 00:11:43 -07:00