The documentation that you linked to has the answer:
http: httplib2.Http, instance to use to make the HTTP request. Callers should supply an instance that has caching enabled.
So, if you want to configure an Http instance with custom arguments instead of the defaults—like enabling caching, as the docs suggest—you construct it, and then pass it here.
The other advantage of passing in a custom Http instance is that you can use a single instance for multiple calls—which makes caching, cookies, etc. a lot more useful.
See httplib2
for how to do this. Note that there's a link to a list of detailed examples, as well as to the docs. Most likely, those examples will be much more useful to you than anything anyone slaps together to post on Stack Overflow. The very first example shows you, in one line, how to create an Http
instance with basic caching. Two examples down, it shows how to use cache-control
. And so on.