Skip to content

Remove Split::Cache and make config.cache a no-op - #771

Merged
andrehjr merged 1 commit into
mainfrom
remove-split-cache
Oct 31, 2026
Merged

andrehjr merged 1 commit into
mainfrom
remove-split-cache

Conversation

@andrehjr

Copy link
Copy Markdown
Member

Removes Split::Cache, as planned in #735.

The cache is held per process, so changes made in one worker (for example setting a winner from the Dashboard) never reached the others. After the recent roundtrip work it no longer pays for that risk. On a Dashboard of 10 experiments with 3 alternatives:

Cache off Cache on
Dashboard page 64 roundtrips 54
ab_test 13 13
  • Split.configuration.cache stays as an accessor, so apps that set it keep booting. It no longer does anything.
  • Every app now behaves as cache = false already did.
  • Split.cache and Split::Cache are gone, so any code calling them directly needs to drop those calls.
  • Adds a spec showing that a winner changed by another process is seen with the setting on. It fails on the old code.

Closes #735
Closes #762

Supersedes #746, which bounded the staleness. Thanks @snaka for the work there and for the issues behind this change.

🤖 Generated with Claude Code

The cache lives in each process, so a winner set from the dashboard stayed
stale in the other workers. It only saves 10 of 64 roundtrips on a dashboard
page and none on ab_test, so it is no longer worth the risk.

config.cache stays as an accessor so apps that set it keep booting.
@andrehjr
andrehjr merged commit 1f7fecd into main Oct 31, 2026
23 checks passed
@andrehjr
andrehjr deleted the remove-split-cache branch October 31, 2026 20:57
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.

Split::Cache never caches falsy values (nil winner / start_time, missing experiment) Fragile caching mechanism

1 participant