Is there any method in Redis to pull an item without deleting it, but keep it in sleep mode for the duration? After the expiration date (and it is not deleted), this element wakes up and may appear again.
http://redis.io/commands/rpoplpush
Pattern: A robust Redis queue is often used as a messaging server to implement processing of background jobs or other messaging tasks. The simple form of the queue is often obtained by pushing the values ββto the list on the producer side and waiting for these values ββon the consumer side using RPOP (using polling) or BRPOP if the client is better served by the blocking operation. However, in this context, the received queue is not reliable, because messages can be lost, for example, in the event of a network problem or if the consumer falls after the message, but it should still be processed. RPOPLPUSH (or BRPOPLPUSH for the blocking option) offers a way to avoid this problem: the consumer retrieves the message and at the same time pushes it into the processing list. He will use the LREM command to remove the message from the processing list after processing the message. An additional client can keep track of the processing list for items that remain there for too long, and if necessary, pull these timeouts back into the queue.
source share