Redis fetch all value of list without iteration and without popping

To retrieve all the items of a list with Redis, you do not need to iterate and fetch each individual items. It would be really inefficient.

You just have to use the LRANGE command to retrieve all the items in one shot.

elements = redis.lrange( "supplier_id", 0, -1 )

will return all the items of the list without altering the list itself.

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)