From 347272600825af3119454c51dd1e43be5dd9bfbc Mon Sep 17 00:00:00 2001 From: Jared Norman Date: Sun, 24 Mar 2019 09:51:44 -0700 Subject: Make cache key configurable Some stores may want to more aggressively cache the responses, preferring fewer requests to more accurate results. --- lib/super_good/solidus_taxjar/tax_calculator.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'lib/super_good/solidus_taxjar') diff --git a/lib/super_good/solidus_taxjar/tax_calculator.rb b/lib/super_good/solidus_taxjar/tax_calculator.rb index e8e12f4..e6ac0a2 100644 --- a/lib/super_good/solidus_taxjar/tax_calculator.rb +++ b/lib/super_good/solidus_taxjar/tax_calculator.rb @@ -123,13 +123,7 @@ module SuperGood end def cache_key - APIParams.order_params(order).transform_values do |value| - case value - when Array, Hash then value.hash - else - value - end - end + SuperGood::SolidusTaxJar.cache_key.(order) end def exception_handler -- cgit v1.2.3