Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add response filtering options #166

Open
JWCook opened this issue Jul 24, 2023 · 0 comments
Open

Add response filtering options #166

JWCook opened this issue Jul 24, 2023 · 0 comments
Labels
enhancement New feature or request

Comments

@JWCook
Copy link
Member

JWCook commented Jul 24, 2023

  • Add a filter() method to get only a subset of cached responses, similar to requests-cache's filter()
  • 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)]
@JWCook JWCook added the enhancement New feature or request label Jul 24, 2023
@JWCook JWCook added this to the v0.9 milestone Jul 24, 2023
@JWCook JWCook modified the milestones: v0.9, v0.10 Sep 19, 2023
@JWCook JWCook modified the milestones: v0.10, v0.11 Oct 27, 2023
@JWCook JWCook removed this from the v0.11 milestone Apr 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant