Look at this code:
import requests
import grequests
import requests_cache
requests_cache.install_cache('bla')
urls = [
'http://www.heroku.com',
'http://python-tablib.org',
'http://httpbin.org',
'http://python-requests.org',
'http://kennethreitz.com'
]
rs = (grequests.get(u) for u in urls)
results = grequests.map(rs)
I would expect that after executing this I will find bla.sqlite
file in the current directory and executing
results = grequests.map(rs)
will be MUCH faster because data will be taken from sqlite cache. Unfortunately this is not true, file wasn't created at all and there is no speedup. When I use requests insetead of grequests everything works fine. So the question is a title says: Is it possible to make grequests and requests_cache work together? and if yes, how?