- Redis Basics
- Redis - Home
- Redis - Overview
- Redis - Environment
- Redis - Configuration
- Redis - Data types
- Redis Commands
- Redis - Commands
- Redis - Keys
- Redis - Strings
- Redis - Hashes
- Redis - Lists
- Redis - Sets
- Redis - Sorted Sets
- Redis - HyperLogLog
- Redis - Publish Subscribe
- Redis - Transactions
- Redis - Scripting
- Redis - Connections
- Redis - Server
- Redis Advanced
- Redis - Backup
- Redis - Security
- Redis - Benchmarks
- Redis - Client Connection
- Redis - Pipelining
- Redis - Partitioning
- Redis - Java
- Redis - Php
- Redis Useful Resources
- Redis - Quick Guide
- Redis - Useful Resources
- Redis - Discussion
Redis - List Lpop Command
Redis LPOP command removes and returns the first element of the list stored at the key.
Return Value
String reply, the value of the first element, or nil when the key does not exist.
Syntax
Following is the basic syntax of Redis LPOP command.
redis 127.0.0.1:6379> LPOP KEY_NAME
Example
redis 127.0.0.1:6379> RPUSH list1 "foo" (integer) 1 redis 127.0.0.1:6379> RPUSH list1 "bar" (integer) 2 redis 127.0.0.1:6379> LPOP list1 "foo"
redis_lists.htm
Advertisements