I believe the correct (maybe only) way to currently add a list of members to a set, overwriting the key if it exists (rather than adding to it), is to first DEL the key and then SADD the members? Is there a better way?
I suggest a new command: SSET
Comment From: mgravell
What would be the purpose of SSET, and how would it differ from SADD, since elements in a set are unique? (SADD with a pre-existing value doesn't change the set contents, with the return value indicating this)
Comment From: mgravell
Oh, I see, you want to empty the set completely and add a single element. Yeah, that doesn't need a bespoke command - DEL plus SADD is fine. There isn't a "only this" for the other aggregate types (hashes, lists, etc) either.
Comment From: enjoy-binbin
We don't add new commands easily, otherwise this will be an endless works. Generally we recommend using script and the like to complete these command combinations.