The Wire · Showcase
RAILS HARDENS MEMCACHESTORE AGAINST DALLI MISUSE
By RepoJournal · Filed · About Rails
Rails now raises ArgumentError when MemCacheStore receives a Dalli::Client directly, closing a deprecated pathway that was supposed to die.
The change [1] enforces what was already promised: MemCacheStore stopped accepting Dalli::Client instances in a prior removal [2], but now it actively rejects them with a clear error rather than silently failing downstream. This is a defensive move for anyone who missed the deprecation warning and shipped code that still passes Dalli clients directly. The error message now correctly states that only "empty array, address, or array of addresses" are allowed, bringing the actual validation in line with the documentation. If you're bootstrapping MemCacheStore in initialization or test fixtures, this will catch mistakes at boot time instead of in production cache misses.
Action items
- → Audit MemCacheStore initialization across your codebase for any direct Dalli::Client passes rails/rails [plan]
- → Update to latest Rails main if you maintain gems that wrap MemCacheStore rails/rails [monitor]
References
- [1] Merge pull request #57289 from p8/activesupport/remove-dalli-class rails/rails
- [2] Raise ArgumentError when MemCacheStore is created with Dalli::Client ↗ rails/rails
FAQ
- What changed in Rails on May 4, 2026?
- Rails now raises ArgumentError when MemCacheStore receives a Dalli::Client directly, closing a deprecated pathway that was supposed to die.
- What should Rails teams do about it?
- Audit MemCacheStore initialization across your codebase for any direct Dalli::Client passes • Update to latest Rails main if you maintain gems that wrap MemCacheStore
- Which Rails repositories shipped on May 4, 2026?
- rails/rails