Sha256: f8366e28376d78f0c97e36e97f152695717f17c8d60031ea23d432601ff35944

Contents?: true

Size: 406 Bytes

Versions: 3

Compression:

Stored size: 406 Bytes

Contents

module Authz
  # This module is a wrapper of Rails.cache and serves as a central
  # point for configuring how Authz's internal Cache works depending
  # on the gem's configuration
  # @api private
  module Cache

    def self.fetch(name, options = nil, &block)
      if Authz.cross_request_caching
        Rails.cache.fetch(name, options, &block)
      else
        block.call
      end
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
authz-0.0.5 lib/authz/cache.rb
authz-0.0.4 lib/authz/cache.rb
authz-0.0.3 lib/authz/cache.rb