This code does not work
import requests
dns_cache.override_system_resolver()
for i in range(10):
requests.get('http://www.coala.io/')
It does not speed up requests but makes them even slowly. Looking into the library code I found that the get method is being called for the dns_cache.hosts.HostsCache object, but the put method calls - for dns_cache.expiration.MinExpirationCache. Of course, it could cache nothing because the self.data dicts are different and the get method could not find items stored in the put method of another object.
This code does not work
It does not speed up requests but makes them even slowly. Looking into the library code I found that the get method is being called for the dns_cache.hosts.HostsCache object, but the put method calls - for dns_cache.expiration.MinExpirationCache. Of course, it could cache nothing because the self.data dicts are different and the get method could not find items stored in the put method of another object.