Setting memcache keys in eval block

agentzh agentzh at
Tue Feb 9 05:39:52 MSK 2010

On Mon, Feb 8, 2010 at 8:36 PM, Markus Jelsma <markus at> wrote:
> Both Memcached modules will complain that the memcached_key or memc_key
> variable was not set, this all happens inside an eval block, outside the eval
> block does work as expected.

The eval module's handler runs before the ngx_rewrite module. So make
sure you always "set" variables inside the eval block. The "set"
directives outside the eval block does not work because they run after
the "eval" block and hence the memcached handler complete.

IIRC, this was mentioned in the ngx_eval module's documentation.


More information about the nginx mailing list