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

region.get_or_create calls creator function when expiration_time = -1 #71

Closed
sqlalchemy-bot opened this issue Jan 21, 2015 · 4 comments
Closed
Labels
bug Something isn't working

Comments

@sqlalchemy-bot
Copy link

Migrated issue, originally created by Fabian Neumann (hellp)

I have a redis backend region that per default has no expiration_time set. Instead I manually set it on each call to region.get_or_create -- depending on some business logic.

In some cases I don't want the cached value to expire at all, so I pass the keyword argument expiration_time=-1. get_or_create still calls the creator function in these cases, which, if I understand it correctly, should not be the case, right? The value is already in the Redis db.

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

this is likely the same issue, will see if i can pull / release today:

https://bitbucket.org/zzzeek/dogpile.cache/pull-request/25/fix-incorrect-expiration-of-value-if/

@sqlalchemy-bot
Copy link
Author

Michael Bayer (zzzeek) wrote:

d05f936

@sqlalchemy-bot
Copy link
Author

Changes by Michael Bayer (zzzeek):

  • changed status to closed

@sqlalchemy-bot
Copy link
Author

Fabian Neumann (hellp) wrote:

Thank you! :)

@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