Skip to content

fix(bigcache): use configured clock.Epoch() in background cleanUp ticker - #453

Open
mazkev wants to merge 1 commit into
allegro:mainfrom
mazkev:fix/cleanup-ticker-clock
Open

mazkev wants to merge 1 commit into
allegro:mainfrom
mazkev:fix/cleanup-ticker-clock

Conversation

@mazkev

@mazkev mazkev commented Nov 27, 2026

Copy link
Copy Markdown
Contributor

Summary

Split from #448: uses the configured cache.clock.Epoch() instead of t.Unix() in the background cleanUp ticker goroutine.

Key Changes

  • In bigcache.go (newBigCache), changed cache.cleanUp(uint64(t.Unix())) to cache.cleanUp(uint64(cache.clock.Epoch())) so custom/mock clocks are honored during periodic cleanup.

@mazkev
mazkev force-pushed the fix/cleanup-ticker-clock branch from d5cae07 to cb3cb5f Compare November 28, 2026 04:43
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.

2 participants