summaryrefslogtreecommitdiff
path: root/lib/super_good
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-06-25 11:51:14 -0700
committerGitHub <noreply@github.com>2019-06-25 11:51:14 -0700
commitbde4deedf6d7fcc2151469bb92103208a988ffe0 (patch)
tree4d8c443b35d4b935baeebf406765933a9fda14b6 /lib/super_good
parenta3272ab16bf1597949fd300cf60743ffe172081f (diff)
parent482438819ceb12499fe75f8b11fe4c505b32816f (diff)
Merge pull request #14 from SuperGoodSoft/better-cache-key
Make cache key a string
Diffstat (limited to 'lib/super_good')
-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}"