Rails 7.1 ships with connection-pooling enabled by default for `RedisCacheStore` (see rails/rails#45235). Because we already wrap our Redis clients in our own `ConnectionPool` ($alfred / $velma), the upgrade resulted in a double-wrapped object and runtime errors such as: NoMethodError: undefined method `get` for an instance of ConnectionPool This patch: * Passes `pool: false` when instantiating `RedisCacheStore` in `config/initializers/rack_attack.rb`, telling Rails to use the pool we supply instead of building its own. * Adds an inline comment explaining the rationale. * Adds a TODO in `config/initializers/01_redis.rb` suggesting a future simplification: switch to plain Redis clients and let Rails manage the pool. Reference docs: * rails/rails#45235 – “Enable connection pooling by default for MemCacheStore and RedisCacheStore” - https://github.com/rails/rails/pull/45235 * Rails 7.1 Caching Guide – 2.1.1 “Connection Pool Options” (use `pool: false`) [Ruby on Rails Guides](https://guides.rubyonrails.org/v7.1/caching_with_rails.html)
9.8 KiB
9.8 KiB