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

refresh() method does not honors should_cache_fn function #107

Open
sqlalchemy-bot opened this issue Dec 24, 2016 · 2 comments
Open

refresh() method does not honors should_cache_fn function #107

sqlalchemy-bot opened this issue Dec 24, 2016 · 2 comments
Labels
bug Something isn't working

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Anonymous

CacheRegion.cache_on_arguments() has a parameter should_cache_fn which is used to control if content should be cached or not. the .refresh() method on the decorated function ignores it and goes directly to the backend.set()

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

refresh probably should consult should_cache_fn (whereas set() should not?) , however I'm not comfortable w/ backwards incompatible behavior here. I'd rather clarify documentation and add .conditional_refresh().

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

Here's a sketch of a patch: https://gerrit.sqlalchemy.org/269 it would be helpful if someone could take the time to contribute tests.

@sqlalchemy-bot sqlalchemy-bot added the bug Something isn't working label Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant