Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

replace hiredis gem with hiredis-client #11708

Merged
merged 3 commits into from
Oct 31, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -98,9 +98,9 @@ gem 'rack-rewrite'
gem 'rack-timeout'
gem 'roadie-rails'

gem 'hiredis'
gem 'hiredis-client'
dacook marked this conversation as resolved.
Show resolved Hide resolved
gem 'puma'
gem 'redis', '>= 4.0', require: ['redis', 'redis/connection/hiredis']
gem 'redis'
gem 'sidekiq'
gem 'sidekiq-scheduler'

Expand Down
10 changes: 6 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,8 @@ GEM
hashery (2.1.2)
hashie (5.0.0)
highline (2.0.3)
hiredis (0.6.3)
hiredis-client (0.17.0)
redis-client (= 0.17.0)
htmlentities (4.3.4)
httpclient (2.8.3)
i18n (1.14.1)
Expand Down Expand Up @@ -564,7 +565,8 @@ GEM
rdf (3.2.11)
link_header (~> 0.0, >= 0.0.8)
redcarpet (3.6.0)
redis (4.8.1)
redis (5.0.8)
redis-client (>= 0.17.0)
redis-client (0.17.0)
connection_pool
regexp_parser (2.8.2)
Expand Down Expand Up @@ -839,7 +841,7 @@ DEPENDENCIES
good_migrations
haml
highline (= 2.0.3)
hiredis
hiredis-client
i18n
i18n-js (~> 3.9.0)
image_processing
Expand Down Expand Up @@ -883,7 +885,7 @@ DEPENDENCIES
rails_safe_tasks (~> 1.0)
ransack (~> 2.6.0)
redcarpet
redis (>= 4.0)
redis
responders
rexml
roadie-rails
Expand Down
8 changes: 7 additions & 1 deletion app/controllers/spree/admin/payment_methods_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,16 @@ def update_params

def clear_preference_cache
@payment_method.calculator.preferences.each_key do |key|
Rails.cache.delete(@payment_method.calculator.preference_cache_key(key))
delete_from_cache @payment_method.calculator.preference_cache_key(key)
end
end

def delete_from_cache(cache_key)
return unless cache_key.class.in? [String, Integer, Float, Symbol]

Rails.cache.delete(cache_key)
end

mkllnk marked this conversation as resolved.
Show resolved Hide resolved
def add_type_to_calculator_attributes(hash)
hash["calculator_attributes"]["type"] = hash["calculator_type"]
end
Expand Down