Welcome! Log In Create A New Profile

Advanced

lua parser and redis2 questions

June 01, 2011 07:27PM
Hi Folks -

Looking for some examples or hints in order to leverage lua_parser && redis2. To date, I've been using httpredis and content_by_lua code to perform a number of simple 'get's which has worked well. Now, I'd like to pipeline a number of redis requests together in order to leverage 'auth' within redis and eventually pipeline numerous 'get's at once.

This is what I have working so far, appreciate any assistance or commentary...

location /redis2 {
set $key $http_host;
redis2_query auth foobar;
redis2_query get $key;
redis2_pass redis-backend;
}

This auth + get works great and yields the following as expected:

+OK
$12
blahblahblah


Goal 1:
I'd like to be able to strip out the +OK\r\n$12\r\n and be left with the actual value of blahblahblah. Hints or example?


Goal 2:
Eventually I'd like to be able to pipeline an 'auth' plus numerous 'gets' together and leverage each value, if a $-1 isn't returned for a 'get', ie:
location /redis2 {
set $key $http_host;
set $key2 $http_host:some_arbitrary_value;
redis2_query auth foobar;
redis2_query get $key;
redis2_query get $key2;
redis2_pass redis-backend;
}


Thanks in advance for any pointers...
Subject Author Posted

lua parser and redis2 questions

gregr401 June 01, 2011 07:27PM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 08:49AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:12AM

Re: lua parser and redis2 questions

Marcos Ortiz June 04, 2011 11:16AM

Re: lua parser and redis2 questions

agentzh June 04, 2011 11:22AM

Re: lua parser and redis2 questions

gregr401 June 04, 2011 02:15PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:06AM

Re: lua parser and redis2 questions

logar.damir June 04, 2011 04:26PM

Re: lua parser and redis2 questions

gregr401 June 05, 2011 06:40PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 04:12AM

Re: lua parser and redis2 questions

logar.damir June 06, 2011 07:16AM

Re: lua parser and redis2 questions

agentzh June 06, 2011 10:56AM

Re: lua parser and redis2 questions

gregr401 June 06, 2011 12:50PM

Re: lua parser and redis2 questions

agentzh June 06, 2011 09:16PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 317
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready