#411·bigcache

The callback function OnRemoveWithReason suddenly stops being called, even though there is new data being written

Author: fang2329Created Jun 30, 2025Updated Jun 30, 2025
Labelsbug

bigCf := bigcache.DefaultConfig(5 * time.Second) bigCf.OnRemoveWithReason = hdl bigCf.HardMaxCacheSize = size

"I'm certain I configured OnRemoveWithReason and it had been triggering callbacks continuously, but for some reason it suddenly stopped. Monitoring confirms data is still being written and the process hasn't panicked."

Environment:

  • Version (git sha or release): v3
  • OS (e.g. from /etc/os-release or winver.exe): ubuntu 16.04
  • go version: 1.20