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

Pull request for adding hash based redis commands implementation in django-redis #41

Open
wants to merge 15 commits into
base: master
Choose a base branch
from

Conversation

bibiboot
Copy link

@bibiboot bibiboot commented Jun 4, 2012

I have added hget, hset, hget_many, hset_many and hincr implementation. Please review it. Thanks.

@bibiboot
Copy link
Author

bibiboot commented Jun 6, 2012

Hi sebleier,
I have committed the needful code as requested ( test cases + benchmark ). The benchmark clearly signifies the memory usage gain when using hashes. I am currently using it for storing meta data of caches. Please review it and let me know.

Thanks.

@Coalpaw
Copy link

Coalpaw commented Aug 14, 2012

Yeah +1 for this, though it should be noted that the maximum number of entries a hash can have while still being encoded efficiently is around 1000 according to this: http://instagram-engineering.tumblr.com/post/12202313862/storing-hundreds-of-millions-of-simple-key-value-pairs

@stanislavshabalin
Copy link

I'm not saying no to this

It's 2014, so you kinda do say no.

How does having the redis hash methods add value to django-redis-cache?

Redis backend has this feature, the library does not, so it essentially limits Redis's functionality.

Hashes are useful to decrease cache entries and thus requests to cache drastically.

@atarkowska
Copy link

atarkowska commented Oct 25, 2016

is there any plan to get hash support in at some point or I should write my own? This is huge limitation

@stanislavshabalin
Copy link

@aleksandra-tarkowska for what it's worth, we've moved to https://github.com/niwinz/django-redis :-)

@atarkowska
Copy link

atarkowska commented Oct 26, 2016

thx, but I still don't see hset, except raw client ?

@stanislavshabalin
Copy link

@aleksandra-tarkowska yup, only raw client. Which does have hset and other stuff: http://redis-py.readthedocs.io/en/latest/
Worked great for me, maybe you could give it a try.

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.

5 participants