Sha256: c2750383523a234994a5bb6f27e12271e063d13c3104788edaf3f7f98c33c2c0
Contents?: true
Size: 316 Bytes
Versions: 3
Compression:
Stored size: 316 Bytes
Contents
# frozen_string_literal: true module CreditCardInfo class Cache def self.fetch(code, &block) return yield unless config.provider config.provider.fetch("#{config.key_prefix}:#{code}", expires_in: config.ttl, &block) end def self.config CreditCardInfo.config.cache end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
credit_card_info-0.2.0 | lib/credit_card_info/cache.rb |
credit_card_info-0.1.1 | lib/credit_card_info/cache.rb |
credit_card_info-0.1.0 | lib/credit_card_info/cache.rb |