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

Update caching.py #125

Closed
wants to merge 1 commit into from
Closed

Update caching.py #125

wants to merge 1 commit into from

Conversation

bbrangeo
Copy link

Description

Related Issue

Example

Copy link

@airnst airnst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment.

@@ -88,7 +83,7 @@ def caching(
requests_cache.install_cache(
cache_name=CACHE_NAME, backend=backend, expire_after=expire_after
)
remove_expired_responses()
requests_cache.delete(expired=True)()
Copy link

@airnst airnst Feb 29, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This fails, since it does not return a callable object (see screenshot). At least if the cache is empty. Should be requests_cache.delete(expired=True) without the trailing parentheses.

Suggested change
requests_cache.delete(expired=True)()
requests_cache.delete(expired=True)

image

@lucbettaieb
Copy link
Contributor

lucbettaieb commented Feb 29, 2024

Upvoting this!

edit:
Not sure the release process, but the pip binary is broken so I made this PR to incorporate the changes now. @bbrangeo , not trying to take this from you; so feel free to push the fix to your branch so it can be incorporated. I just want to see it fixed :)
#127

@CecSve
Copy link
Contributor

CecSve commented Mar 1, 2024

We have merged #127

@CecSve CecSve closed this Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants