Method: Authz::Cache.fetch

Defined in:
lib/authz/cache.rb

.fetch(name, options = nil, &block) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



8
9
10
11
12
13
14
# File 'lib/authz/cache.rb', line 8

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