| Subject: | Re: Setting cache parameters via if directives | |
|---|---|---|
| From: | agentzh (agen...@gmail.com) | |
| Date: | Feb 1, 2011 12:53:26 am | |
| List: | ru.sysoev.nginx | |
Refine Search
| From | Sent On | Attachments |
|---|---|---|
| Jeff Mitchell | Jan 27, 2011 9:07 pm | |
| Ryan Malayter | Jan 28, 2011 7:55 am | |
| Jeff Mitchell | Jan 29, 2011 12:19 am | |
| Jeff Mitchell | Jan 29, 2011 8:05 am | |
| Guzman Braso | Jan 29, 2011 3:57 pm | |
| agentzh | Feb 1, 2011 12:46 am | |
| agentzh | Feb 1, 2011 12:53 am | |
| Ryan Malayter | Feb 1, 2011 7:45 am |
| Subject: | Re: Setting cache parameters via if directives | |
|---|---|---|
| From: | agentzh (agen...@gmail.com) | |
| Date: | Feb 1, 2011 12:53:26 am | |
| List: | ru.sysoev.nginx | |
On Tue, Feb 1, 2011 at 4:47 PM, agentzh <agen...@gmail.com> wrote:
Consider the following config snippet:
location /test { set $a 3; if ($a = 3) { set $a 4; } echo $a; }
GET /test will give you nothing for nginx 0.7.21 ~ 0.9.4.
Forgot to mention that we've been in favor of ngx_lua's set_by_lua and rewrite_by_lua directives to do something like this:
location /test { set $a 3; set_by_lua $a ' if ngx.var.a == "3" then return 4 end '; echo $a; }
and GET /test will give you the expected answer, "4" and the performance remains outstanding especially when you've enabled LuaJIT 2.0 ;)
Cheers, -agentzh
_______________________________________________ nginx mailing list ngi...@nginx.org http://nginx.org/mailman/listinfo/nginx

