Your options are as follows:
- Using
LREM
and replacing it if it was found. - Maintaining a separate
SET
in conjunction with yourLIST
- Looping through the
LIST
until you find the item or reach the end.
Redis lists are implemented as a, hence the limitations. I think your best option is maintaining a duplicate SET
. Regardless, make sure your actions are atomic with MULTI
–EXEC
or Lua scripts.