aiohttp-client-cache
aiohttp-client-cache copied to clipboard
Add response filtering options
- Add a
filter()method to get only a subset of cached responses, similar to requests-cache'sfilter() - To start, filtering out expired responses would be the most useful option
- Other options (like
older_than) could be added if/when needed - Support the same option(s) for
get_urls()
Example usage:
async for response in session.cache.filter(expired=False):
print(response)
urls = [url async for url in session.cache.get_urls(expired=False)]