Advanced Requests#
Following are some tips on using requests-cache with some of the more advanced features of the requests library.
Event Hooks#
Requests has an event hook system that can be used to add custom behavior into different parts of the request process. It can be used, for example, for request throttling:
Streaming Requests#
If you use streaming requests, you can use the same code to iterate over both cached and non-cached requests. Cached response content will have already been read (i.e., consumed), but will be available for re-reading so it behaves like the original streamed response: