Module: Restforce::Client::Caching

Included in:
Restforce::Client
Defined in:
lib/restforce/client/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



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

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