-
-
Notifications
You must be signed in to change notification settings - Fork 428
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
Why pickle strings? #59
Comments
Hi @askaliuk I have used pickle for serialize everything for conserve the real type for everything (django-redis-cache was some bugs related to serialize string, but deserializes integer...) Now, django-redis deals with integer values as special values and stores it without pickling, allowing For more information: https://github.com/niwibe/django-redis/blob/master/redis_cache/client/default.py#L281 If you know any better approach for it, maintaining atomic operations for integers, improvements are welcome. |
As workaround, if you want store raw strings, you can use Also, you can subclass the default client, and overwrite pickle and unpickle methods with own behavior (WARNING: in future release these methods will change to serialize/deserialize ;)) |
Thank you @niwibe for explanation. |
Thanks to you for your interest! ;) |
Hello @niwibe ,
IMHO, I found strange
django-redis
behavior in simple JSON caching.Redis monitor:
Why does it pickle simple JSON string? Pickled version will take more memory.
Please explain - is it desired behavior?
The text was updated successfully, but these errors were encountered: