is it possible to connect to memcached and check in access phase?

Huy Phan dachuy at gmail.com
Sun Feb 22 20:25:58 MSK 2009


I'm trying to build a nginx module for the need of my workflow :
In access phase :
1. Connect to  the memcached and get value for key "abcxyz"
2. If the value is 1, return NGX_HTTP_OK ( 200 )
2. If the value is 0, return NGX_HTTP_FORBIDDEN ( 403 )

As far as I know, upstream is the only way to connect to memcached, but 
it's using callback mechanism ( asynchronous request ) .
Is it possible to connect to the memcached and wait for result ( 
synchronous ) , then return corresponding code right inside handler 
function of access phase ?





More information about the nginx mailing list