Closed minhncud closed 6 years ago
I think this is a general redis data design question. And it really depends on how are you going to access data. i.e. if you always retrieve a small set of the hash keys, you probably don't need range queries, and can do it with multiple HGET or HMGET
Didn't wanted to close this yet, sorry.
You should be able to get multiple hash fields with RedisDictionary collection GetRange
method, which uses Redis HMGET.
Also, if your field keys are strings, you can use ScanHashed method on RedisCacheProvider
. It internally uses the Redis HSCAN command.
Yeah, you've just inserted GetRange, right? Yesterday i don't see it in RedisDictionary.cs. And is your new master project does not automatically get Nuget's packages? I can not build it to test :(
yes, I've added some missing methods.
Will check the build error
I can't reproduce the build problem.
Just did the following and it compiles with no errors:
git clone https://github.com/thepirat000/CachingFramework.Redis.git
dotnet build CachingFramework.Redis
Although i can not debug by add a new project which has dependencies base on your master projects. Errors about version of Newsonsoft.Json, StackExchange.Redis. If i get them manually, new error Could not load file or assembly "CachingFramework.Redis, Version=10.0.1.0, Culture=neutral, PublicKeyToken=3982df00cecbd320" happened. But using the newest version of CachingFramework.Redis in a single project solution, it works well, thank you very much :D
Not this problem but the Configuration.md link to StackExchange.Redis of your home page is typed wrong "Docs" vs "docs": "The constructor parameter must be a valid StackExchange.Redis connection string. Check this for more information about StackExchange.Redis configuration options." you set this to link "https://github.com/StackExchange/StackExchange.Redis/blob/master/Docs/Configuration.md" -> 404 not found because the real link is "https://github.com/StackExchange/StackExchange.Redis/blob/master/docs/Configuration.md"
I stored a list object (contains ID and values) to a key on Redis and i want to update it without remove that key and insert again. I need get a smaller list object, insert new object, remove last object or edit an object.
Can you help me that? Thanks. _ Edit: I think Hash is the best choice, so can i get smaller list object instead of getting all and filter in server? Because i use GetHashedAll to get 60 fields in a key, it run in ~2s. Thank you.