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.
One email a day. Unsubscribe in one click.
Keep up with Rails in about 3 minutes a day: what actually shipped — the commits, pull requests, releases, and security advisories that matter.
One email a day. Unsubscribe in one click. Read a past issue →
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