title: scrapy with DNSCACHE_ENABLED=False not working
body: <p>When i run scrapy shell with DNSCACHE_ENABLED=False got KeyError: 'dictionary is empty'
  twisted.internet.error.DNSLookupError: DNS lookup failed: no results for hostname lookup: www.mydomain.com.</p>
  
  <pre><code>2017-07-03 03:09:12 [twisted] CRITICAL: while looking up www.mydomain.com with &lt;scrapy.resolver.CachingThreadedResolver object at 0x3fd0050&gt;
  Traceback (most recent call last):
    File "/usr/lib64/python2.7/site-packages/twisted/internet/defer.py", line 653, in _runCallbacks
      current.result = callback(current.result, *args, **kw)
    File "/usr/lib64/python2.7/site-packages/scrapy/resolver.py", line 29, in _cache_result
      dnscache[name] = result
    File "/usr/lib64/python2.7/site-packages/scrapy/utils/datatypes.py", line 305, in __setitem__
      self.popitem(last=False)
    File "/usr/lib64/python2.7/collections.py", line 159, in popitem
      raise KeyError('dictionary is empty')
  KeyError: 'dictionary is empty'
  2017-07-03 03:09:12 [scrapy.downloadermiddlewares.retry] DEBUG: Gave up retrying &lt;GET //www.mydomain.com/&gt; (failed 3 times): DNS lookup failed: no results for hostname lookup: www.mydomain.com.
  Traceback (most recent call last):
    File "/usr/bin/scrapy", line 11, in &lt;module&gt;
      sys.exit(execute())
    File "/usr/lib64/python2.7/site-packages/scrapy/cmdline.py", line 149, in execute
      _run_print_help(parser, _run_command, cmd, args, opts)
    File "/usr/lib64/python2.7/site-packages/scrapy/cmdline.py", line 89, in _run_print_help
      func(*a, **kw)
    File "/usr/lib64/python2.7/site-packages/scrapy/cmdline.py", line 156, in _run_command
      cmd.run(args, opts)
    File "/usr/lib64/python2.7/site-packages/scrapy/commands/shell.py", line 73, in run
      shell.start(url=url, redirect=not opts.no_redirect)
    File "/usr/lib64/python2.7/site-packages/scrapy/shell.py", line 48, in start
      self.fetch(url, spider, redirect=redirect)
    File "/usr/lib64/python2.7/site-packages/scrapy/shell.py", line 115, in fetch
      reactor, self._schedule, request, spider)
    File "/usr/lib64/python2.7/site-packages/twisted/internet/threads.py", line 122, in blockingCallFromThread
      result.raiseException()
    File "&lt;string&gt;", line 2, in raiseException
  twisted.internet.error.DNSLookupError: DNS lookup failed: no results for hostname lookup: www.mydomain.com.
  </code></pre>
  
  <p>Any thoughts welcome</p>