# File lib/openshift-origin-controller/app/helpers/legacy_broker_helper.rb, line 2
  def get_cached(key, opts={})
    unless Rails.configuration.action_controller.perform_caching
      if block_given?
        return yield
      end
    end
  
    val = Rails.cache.read(key)
    unless val
      if block_given?
        val = yield
        if val
          Rails.cache.write(key, val, opts)
        end
      end
    end
  
    return val
  end