2808 explained code solutions for 75 technologies

lua-redisGet list values

local redis = (require 'redis').connect('', 6379)
local list = redis:lrange('list_key', 0, 10)ctrl + c
require 'redis'

load Redis module for Lua


connect to Redis server

'', 6379

Redis host and port to connect to


gets values of specified list


key name of the Redis list to get

0, 10

return list items starting from first (0 index) and ending with 10th item