is it possible to connect to memcached and check in access phase?
Huy Phan
dachuy at gmail.com
Mon Feb 23 03:20:18 MSK 2009
Hi Manilo,
Thank you for your quick reply :)
I'm checking the source code of some memcached client from
google code.
Hope I can find something here.
In fact I've already used the code of ngx_http_memcached_module
(using upstream) for my workflow, and it works, but not in the
access phase.
I still don't get the point when you said we can use
asynchronous in access phase. Because the code is something
like this :
ngx_int_t rc;
static ngx_int_t
ngx_http_mymodule_handler(ngx_http_request_t *r)
{
ngx_http_mymodule_request_init(r);
// Do something to let this function wait here
// until the callback is done
// Now I got the result
if (rc)
return NGX_HTTP_OK;
else return NGX_HTTP_FORBIDDEN;
}
void
ngx_http_mymodule_callback_function(ngx_http_request_t *r)
{
// leave the data to rc;
}
How can the handler function wait for the result of
callback function in this case ?
More information about the nginx
mailing list