Use LRANGE
with LTRIM
in a pipeline. The pipeline will be run as one atomic transaction. Your worry above about WATCH
, EXEC
will not be applicable here because you are running the LRANGE
and LTRIM
as one transaction without the ability for any other transactions from any other clients to come between them. Try it out.