Skip to content

Fix race_condition_ttl being a silent no-op in ActiveSupportCacheStore#1018

Merged
jnunemaker merged 1 commit into
mainfrom
race-condition-ttl-noop
Jul 8, 2026
Merged

Fix race_condition_ttl being a silent no-op in ActiveSupportCacheStore#1018
jnunemaker merged 1 commit into
mainfrom
race-condition-ttl-noop

Conversation

@jnunemaker

Copy link
Copy Markdown
Collaborator

write_options read the :race_condition_ttl key as a bare expression instead of assigning to it, so a configured race_condition_ttl: was never passed to the underlying cache. Users setting it to guard against cache stampedes got no protection, with no error or warning. This one-line fix assigns the value, and adds specs asserting the option is passed to the cache when configured and omitted when not.

🤖 Generated with Claude Code

Line 83 of write_options read the :race_condition_ttl key as a bare
expression instead of assigning to it, so the configured value was never
passed to the cache. Users setting race_condition_ttl: to guard against
cache stampedes got no protection, with no error or warning.

Also adds specs asserting the option is passed to the cache when
configured and omitted when not.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@jnunemaker jnunemaker self-assigned this Jul 8, 2026
@jnunemaker jnunemaker merged commit 03a1476 into main Jul 8, 2026
46 checks passed
@jnunemaker jnunemaker deleted the race-condition-ttl-noop branch July 8, 2026 06:19
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.

1 participant