Access to memcache variable in module
Maxim Dounin
mdounin at mdounin.ru
Tue Mar 20 12:39:17 UTC 2012
Hello!
On Tue, Mar 20, 2012 at 11:34:57AM +0000, Adelino Monteiro wrote:
> Hello,
>
> This maybe a stupidly simple question but I haven't found an answer yet.
> I have a working nginx module where I process one of the http variabels
> using ngx_http_arg function ngxinx provides.
> What I'm doing know is to have this same http variable being searching in
> memcache and if found I want to pass that value to my module.
>
> What would be the correct way to achieve this?
The ngx_http_subrequest() function with
NGX_HTTP_SUBREQUEST_IN_MEMORY flag should do the trick. Take a
look at ngx_http_ssi_filter_module.c for an example.
Maxim Dounin
More information about the nginx-devel
mailing list