Use ActiveSupport::Concern
extract query cache common behaviour into module