Skip to content

int() argument must be a string or a number, not 'object' #118

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

Open
onegreyonewhite opened this issue May 27, 2016 · 2 comments
Open

int() argument must be a string or a number, not 'object' #118

onegreyonewhite opened this issue May 27, 2016 · 2 comments

Comments

@onegreyonewhite
Copy link

jazzband/django-redis#199

Using django-redis because have crypted serializer for it.

@onegreyonewhite
Copy link
Author

This happends because you are using django.core.cache.backends.base.DEFAULT_TIMEOUT.
How we can fix it?

@diox
Copy link

diox commented Sep 2, 2016

It seems to happen when cache-machine gets something from the cache, and then the same instance is re-used to cache something again. In that second time, somehow DEFAULT_TIMEOUT is not the original DEFAULT_TIMEOUT object, but a different one, so when the backend compares it, it finds it's different and happily accepts it as a normal timeout value, causing the failure later.

There is some code to guard against this, when it retrieves from the cache, it re-sets timeout to the correct DEFAULT_TIMEOUT, but somehow in that particular case it's broken, not sure why.

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

No branches or pull requests

2 participants