No. In redis, only pop instructions perform deletion operations while taking values. The RANGE type operation can only take data within a specified range and cannot delete it at the same time. Wouldn’t this need be solved by writing a few lines of PHP code? There is no need to be so entangled, right?
There is no similar method, it can be implemented like this:
lorange 0, 5 to get the first 6 elements
ltrim 7, -1 deletes the elements before the 7th element
There are also some boundary conditions, please check the documentation.
No. In redis, only pop instructions perform deletion operations while taking values. The RANGE type operation can only take data within a specified range and cannot delete it at the same time.
Wouldn’t this need be solved by writing a few lines of PHP code? There is no need to be so entangled, right?