It seems that there is a gem that can deal with Sidekiq, but what about ActiveJob?
https://github.com/steveklabnik/request_store#using-with-sidekiq
A companion library, request_store-sidekiq creates a Sidekiq middleware that will ensure the store is cleared after each job is processed, for security and consistency with how this is done in Rack.