-
Notifications
You must be signed in to change notification settings - Fork 29
Support for HSET/HGET feature #53
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
Comments
And also, this is a compatible solution for other cache-manager store implementations. |
@kcauchy I think It is good Idea, maybe you could do a PR for us to check out the implementation, what do you think @PuKoren ? |
Agree, looks good! |
It seems not able to be done. There are two problems:
Seems that is a design problem for node-cache-manager. |
Automatically converting the existing SET/GET commands to HSET/HGET is not a good idea. HSET/HGET are associated with the hash data type in redis and most commonly represent objects with
This is not a good option for a simple key/value store like cache-manager for the reasons noted above -- no ttl / expires command for individual values and no easy way to scan the keys. To support the hash data type, as well as the other data types redis offers, it would be better to have something like a
In this way, we could support virtually all of the underlying redis commands. However, the user would be responsible for ensuring the command and parameters were correct, and for knowing the return value. |
Very nice observation by @jeff-kilbride, however even us when we use this module we more frequently store objects then we do simple string values, so It might be worth supporting out of the box, or make it configurable, I very much like the idea with the |
@kcauchy still interested in doing the PR ? |
sorry. Not involved any more. I made a more powerful cache system and support much more features than just hset/hget.
… On 21 Aug 2017, at 18:36, Mihovil Rister ***@***.***> wrote:
@kcauchy still interested in doing the PR ?
―
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@kcauchy. Ok thanks, might you show us this system if it is open source? :-) |
Sure... |
I'll reopen this in the meantime for further discussion, @dial-once/developers thoughts? |
To my knowledge, the HSET/HGET will have better performance when there are many keys share the prefix, just like this:
My suggestion is to store the everything after the last
/
symbol as the HSET/HGET key. For example, we should turn:to:
automatically.
If you like this idea, I will push you a PR.
The text was updated successfully, but these errors were encountered: