diff options
author | Jared Norman <jared@super.gd> | 2019-03-24 11:49:16 -0700 |
---|---|---|
committer | Jared Norman <jared@super.gd> | 2019-03-24 11:50:31 -0700 |
commit | 1b167080f469f36a76512dd3fb45389e1b2578f3 (patch) | |
tree | e47b33e4328fd0a9e3904d5b0bef90c23cb54cda /lib | |
parent | 981ee59475e4ba1257a5846f0773acac57b548fa (diff) |
Remove cache key hack
This never actually worked as expected. While imperfect, use the order
params directly will produce better results.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/super_good/solidus_taxjar.rb | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/super_good/solidus_taxjar.rb b/lib/super_good/solidus_taxjar.rb index ba4ff48..4e7d9c5 100644 --- a/lib/super_good/solidus_taxjar.rb +++ b/lib/super_good/solidus_taxjar.rb @@ -22,15 +22,7 @@ module SuperGood end self.cache_duration = 3.hours - self.cache_key = ->(order) { - APIParams.order_params(order).transform_values do |value| - case value - when Array, Hash then value.hash - else - value - end - end - } + self.cache_key = ->(order) { APIParams.order_params(order) } self.discount_calculator = ::SuperGood::SolidusTaxJar::DiscountCalculator self.exception_handler = ->(e) { Rails.logger.error "An error occurred while fetching TaxJar tax rates - #{e}: #{e.message}" |