Make rueidis store to be more user-friendly and be more performant #188
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Hi @eko, @rwrz,
Following #187, I made some breaking changes in this PR:
Get()
andGetWithTTL()
return gostring
instead ofrueidis.RedisResult
to be more user-friendly.Set()
only accept gostring
value, sinceGet()
also returns gostring
.GetWithTTL()
retrive client-side TTL without additional network roundtrip.And some improvements:
SADD
andEXPIRE
while setting key tags to reduce network roundtrips.SMEMBERS
while doingInvalidate()
, since it will also be invalidated soon.I also re-run the
BenchmarkRueidisSet
:BEFORE:
AFTER: