REDIS2 Addon, Query LRANGE Support?

Alexander Kunz akunz at ntmedia.de
Wed Feb 16 22:40:12 MSK 2011


Sorry, my mistake. The current version (updated 4 days ago) works pretty 
well.

Thanks so much agentzh for fixing...


On 16.02.2011 19:14, Alexander Kunz wrote:
>
> Hello,
>
> is it possible to query a LRANGE request with the redis2 addon? I try 
> this:
>
>     location /redis {
>         set_unescape_uri $query $arg_query;
>         redis2_raw_query $query;
>         redis2_pass 127.0.0.1:6379;
>     }
>
>     location /redis-test {
>             content_by_lua '
>                 local parser = require("redis.parser")
>                 local get = ngx.location.capture("/redis", { args = { 
> query = "LRANGE mylist 0 2\\r\\n" } } )
>                 local res, typ = parser.parse_reply(get.body)
>
>                 ngx.print(res)
>             ';
>     }
>
> But i get this error:
>
> [error] 25328#0: *19 Redis server returns invalid response at 18 near "*3
> $4
> foo7
> $4
> foo6
> $4
> foo5
> " while reading response header from upstream
>
> The result in my error log is ok, any chance to get this result into a 
> lua structure in nginx?
>
> Thanks for any hint.
>
> Alexander
>
>
>
>
>
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx




More information about the nginx mailing list