Redix LogoDocumentation
API ReferenceLists

LPush

Push one or more values to the left (head) of a list

Syntax

Redix.LPush(key, value1, value2, ...)

Parameters

Prop

Type

Returns

Prop

Type

Examples

-- Push single value
Redix.LPush('queue:tasks', {task = 'process_order', id = 123})

-- Push multiple values
Redix.LPush('notifications',
    {type = 'message', content = 'Hello'},
    {type = 'alert', content = 'Warning'}
)

-- Stack implementation (LIFO)
Redix.LPush('stack', 'item1')
Redix.LPush('stack', 'item2')