def api_call(method, path, params ={}, &proc)
      if cache = caching? && (@cache[cache_key(path, params)])
        return cache
      else
        if @logging
          Calculated::Logging.log_calculated_api(method, path, params) do
            api_call_without_logging(method, path, params, &proc)
          end
        else
          api_call_without_logging(method, path, params, &proc)
        end
      end
    end
def api_call(method, path, params ={}, &proc)
      if cache = caching? && (@cache[cache_key(path, params)])
        return cache
      else
        if @logging
          Calculated::Logging.log_calculated_api(method, path, params) do
            api_call_without_logging(method, path, params, &proc)
          end
        else
          api_call_without_logging(method, path, params, &proc)
        end
      end
    end
if we caching and we have the same cache lets try and get the
 cache; otherwise we will make the request logging if need be