问题
In terms of performace which is better?, A: set 500 keys with mset and then 500 expires in a pipeline B: 500 set with expiration in a pipeline too.
Thank you!
回答1:
MSET is a atomic operation, use them when you want atomicity for those keys, else use SETEX in pipeline. For performance you have to test them.
来源:https://stackoverflow.com/questions/61626398/redis-using-one-mset-operation-with-bunch-of-expire-operations-in-pipeline-or-b