lua parser and redis2 questions

logar.damir nginx-forum at
Sat Jun 4 16:49:42 MSD 2011

I'm new to redis/nginx combinations, however I think you should also add
following modules:

Then you can use 

content_by_lua '
local replies = ngx.location.capture("/redis2")
local parser = require('redis.parser')
-- assuming the replies variable holds n redis responses
--  to be parsed:
    local results = parser.parse_replies(replies, n)
    for i, result in ipairs(results) do
        local res = result[1]
        local typ = result[2]
        -- res and typ have exactly the same meaning as in
        --  the parse_reply method documented above

Posted at Nginx Forum:,203154,203862#msg-203862

More information about the nginx mailing list