module Restforce::Concerns::Caching

def cache

Internal: Cache to use for the caching middleware
def cache
  options[:cache]
end

def with_caching

def with_caching
  options[:use_cache] = true
  yield
ensure
  options[:use_cache] = false
end

def without_caching

Returns the result of the block

block - A query/describe/etc.

Public: Runs the block with caching disabled.
def without_caching
  options[:use_cache] = false
  yield
ensure
  options.delete(:use_cache)
end