-
Notifications
You must be signed in to change notification settings - Fork 0
Fixed GetOrSet redis read. #25
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
Conversation
| var redisValue = GetRedisValue(k); | ||
| if (!redisValue.IsNull) | ||
| { | ||
| var ttlValue = TTLValue.FromRedisValue<T>(Encoding.ASCII.GetBytes(redisValue.ToString())); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a HzActivities.Source.StartActivityWithCommonTags so we can see the time here
| var redisBackedValueFactory = new Func<string, Task<T>>(async k => | ||
| { | ||
| var redisValue = await GetRedisValueAsync(k).ConfigureAwait(false); | ||
| if (!redisValue.IsNull) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add a HzActivities.Source.StartActivityWithCommonTags so we can see the time here
| } | ||
|
|
||
| private Task<RedisValue> GetRedisValueAsync(string key) | ||
| { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a using var activity = HzActivities.Source.StartActivityWithCommonTags(HzActivities.Names.GetFromRedis, key,async;true);
|
|
||
| private RedisValue GetRedisValue(string key) | ||
| { | ||
| return redisDb.StringGet(GetRedisKey(key)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add a using var activity = HzActivities.Source.StartActivityWithCommonTags(HzActivities.Names.GetFromRedis, key,async;false);
No description provided.