From 482438819ceb12499fe75f8b11fe4c505b32816f Mon Sep 17 00:00:00 2001 From: Jared Norman Date: Tue, 25 Jun 2019 11:49:55 -0700 Subject: Make cache key a string --- lib/super_good/solidus_taxjar.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/super_good/solidus_taxjar.rb b/lib/super_good/solidus_taxjar.rb index af2c7e8..1016397 100644 --- a/lib/super_good/solidus_taxjar.rb +++ b/lib/super_good/solidus_taxjar.rb @@ -24,7 +24,7 @@ module SuperGood end self.cache_duration = 3.hours - self.cache_key = ->(order) { APIParams.order_params(order) } + self.cache_key = ->(order) { APIParams.order_params(order).to_json } self.discount_calculator = ::SuperGood::SolidusTaxJar::DiscountCalculator self.exception_handler = ->(e) { Rails.logger.error "An error occurred while fetching TaxJar tax rates - #{e}: #{e.message}" -- cgit v1.2.3