Skip to content

commitment: remove WarmupCache.enabled atomic.Bool#20959

Merged
AskAlexSharov merged 1 commit into
mainfrom
alex/simplify_warmup_cache_35
May 5, 2026
Merged

commitment: remove WarmupCache.enabled atomic.Bool#20959
AskAlexSharov merged 1 commit into
mainfrom
alex/simplify_warmup_cache_35

Conversation

@AskAlexSharov

Copy link
Copy Markdown
Collaborator

WarmupCache.enabled was always trueEnable()/IsEnabled() were never called in production code. Every hot-path method was paying an atomic load for nothing; all call sites already guard with if cache != nil.

  • Remove enabled atomic.Bool field and Enable/IsEnabled methods
  • Remove the c.enabled.Load() guard from every Put*/Get*/Evict* method
  • Remove the corresponding test (TestWarmupCache_Enable)

@AskAlexSharov AskAlexSharov enabled auto-merge May 3, 2026 12:38
@AskAlexSharov AskAlexSharov requested a review from JkLondon May 4, 2026 08:36
@AskAlexSharov AskAlexSharov added this pull request to the merge queue May 5, 2026
Merged via the queue into main with commit 919cc82 May 5, 2026
38 checks passed
@AskAlexSharov AskAlexSharov deleted the alex/simplify_warmup_cache_35 branch May 5, 2026 10:31
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