clear_set
Deletes all keys then sets new keys in a single command.
This command may be more convenient or efficient than using set.
This is useful if there are many keys to update and the full set of keys are available. This is convenient to add new keys, update existing keys and delete keys that are no longer required.
Examples
With Group
await kv.set({
'username':'some_username',
'city':'London',
'status':'Active',
'client_version':2
},
group='a@xyz.com')
# update existing keys (username, status), set a new key (age) and
# delete unused key (client_version)
await kv.clear_set({
'username':'new_username',
'city':'London',
'age':55,
'status':'AuthRequired'
},
group='a@xyz.com')