Module: Restforce::Concerns::Caching

Included in:
AbstractClient
Defined in:
lib/restforce/concerns/caching.rb

Instance Method Summary collapse

Instance Method Details

#without_caching(&block) ⇒ Object

Public: Runs the block with caching disabled.

block - A query/describe/etc.

Returns the result of the block



9
10
11
12
13
14
# File 'lib/restforce/concerns/caching.rb', line 9

def without_caching(&block)
  options[:use_cache] = false
  block.call
ensure
  options.delete(:use_cache)
end