summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-06-25 11:49:55 -0700
committerJared Norman <jared@super.gd>2019-06-25 11:49:55 -0700
commit482438819ceb12499fe75f8b11fe4c505b32816f (patch)
tree4d8c443b35d4b935baeebf406765933a9fda14b6 /lib
parenta3272ab16bf1597949fd300cf60743ffe172081f (diff)
Make cache key a string
Diffstat (limited to 'lib')
-rw-r--r--lib/super_good/solidus_taxjar.rb2
1 files changed, 1 insertions, 1 deletions
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}"