1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/lib
Simon Coffey abca42db3c Revert "Use active record cache when available"
This reverts commit a27d692656.

The reason for reverting is that this middleware has no effect. In Rails
5.0+, Sidekiq runs its jobs using the Rails reloader/executor API[1].

In Rails 5.0+, however, the ActiveRecord query cache registers its own
hooks with the executor[2], and these hooks automatically enable the
query cache for the duration of any work the executor performs[3].

As a result, the query cache is already on by default for any Sidekiq
jobs run in Rails 5.0+, so it's not necessary to separately enable it in
a middleware.

[1] eca6acc0ce/lib/sidekiq/rails.rb (L33-L37)
[2] f8c00c1300/activerecord/lib/active_record/railtie.rb (L159-L163)
[3] f8c00c1300/activerecord/lib/active_record/query_cache.rb (L26-L41)
2018-02-15 10:02:52 -08:00
..
generators/sidekiq Fix RSpec generated worker template indentation 2017-05-29 10:46:12 -07:00
sidekiq Revert "Use active record cache when available" 2018-02-15 10:02:52 -08:00
sidekiq.rb rename API to death handlers for consistency 2018-01-31 10:22:22 -08:00