Closed FatihKosal closed 9 months ago
Hi @ FatihKosal
Could you add the unit test to your method so I can test and deploy it?
Thanks
Hi @imperugo added HashGetAllAsyncAtOneTimeAsync_ValueExists_Async test method. It is working by setting KeyPrefix = "" in internal CacheClientTestBase(ISerializer serializer). With KeyPrefix = "MyPrefix__",It is not working fyi.
Hi @imperugo someshow this pull request was closed by me mistakenly So I reopened it. You can test the method that I added as I described at above comment
Hi @FatihKosal thanks again for the PR. I'm going to merge it and changes some things in order to reduce allocation (like lists allocation with resize, ToArray and so on.
Soon in nuget
Just reverted and reopen the PR again because the tests are not green.
The data returned byt this line
var data = await Database.ScriptEvaluateAsync(luaScript, redisKeys, flags: commandFlags).ConfigureAwait(false);
has always length 0
There is Task<IDictionary<string, T?>> HashGetAsync(string hashKey, string[] keys, CommandFlags flag = CommandFlags.None);
But this has a lot of network round trips against Redis.
But this new method Task<IDictionary<string, T?>> HashGetAllAsyncAtOneTimeAsync(string hashKey, string[] keys, CommandFlags flag = CommandFlags.None);
is fetching values at one time.
In load test that I did run on my local machine for 50 keys with 100 virtual concurrent users, HashGetAllAsyncAtOneTimeAsync worked approximately 3.5 times faster than HashGetAsync.
It uses Lua Script.