summaryrefslogtreecommitdiff
path: root/lib/super_good/solidus_taxjar.rb
diff options
context:
space:
mode:
authorJared Norman <jared@super.gd>2019-03-24 10:02:07 -0700
committerJared Norman <jared@super.gd>2019-03-24 10:02:07 -0700
commit65e678ddcd32d6c5edc59c86b77800d86a5cdba3 (patch)
treebb53342ba8752b06309e59f03ad1b307ee845dd2 /lib/super_good/solidus_taxjar.rb
parent347272600825af3119454c51dd1e43be5dd9bfbc (diff)
Make cache duration configurable
Diffstat (limited to 'lib/super_good/solidus_taxjar.rb')
-rw-r--r--lib/super_good/solidus_taxjar.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/super_good/solidus_taxjar.rb b/lib/super_good/solidus_taxjar.rb
index 7033501..ba4ff48 100644
--- a/lib/super_good/solidus_taxjar.rb
+++ b/lib/super_good/solidus_taxjar.rb
@@ -11,6 +11,7 @@ require "super_good/solidus_taxjar/discount_calculator"
module SuperGood
module SolidusTaxJar
class << self
+ attr_accessor :cache_duration
attr_accessor :cache_key
attr_accessor :discount_calculator
attr_accessor :exception_handler
@@ -20,6 +21,7 @@ module SuperGood
attr_accessor :test_mode
end
+ self.cache_duration = 3.hours
self.cache_key = ->(order) {
APIParams.order_params(order).transform_values do |value|
case value