Setting memcache keys in eval block

Markus Jelsma markus at buyways.nl
Sun Feb 14 23:00:54 MSK 2010


Valery!


This sounds lovely! I'll try this back at the office tomorrow. I assume
this also allows for multiple memc_pass and proxy_pass directives in a
single location block?

Anyway, i'm quite happy and thank you very much for your efforts!


Cheers,


Valery Kholodkov said:
> Markus Jelsma wrote:
>> Thank you for your quick answer, although it is not quite a
>> satisfaction to  read it's not possible at the moment.
>>
>> How can i stay up to date for such a feature if it were to be
>> implemented in  the - hopefully nearby - future?
>
> I just have pushed a change to nginx eval module which allows multiple
> eval blocks in one location:
>
> http://github.com/vkholodkov/nginx-eval-module/tree/bba2d53fc1d8f118fb79424250db8c9e832b66c1
>
> Hope this helps!
>
>>
>> I have another question, is my current solution really much slower
>> than doing  it all in one location directive? I am now proxying the
>> request the myself  where i can set the second eval block.
>>
>> I did perform some simple benchmarks but they aren't really alright
>> since i  cannot really compare the situations but 2 http requests + 2
>> memcache requests  are quite slow in the end.
>>
>> Thanks.
>>
>>
>>> No, it won't work. According to the current implementation, only one
>>> eval block can take effect in a single location.
>>>
>>> I must admit parallel eval blocks can be very useful and I believe it
>>> should not be that hard to implement. But I have other missions to do
>>> first atm ;)
>>>
>>> Actually I want something much more general, that can be mixed with
>>> other rewrite directives, like this:
>>>
>>>     set $foo 'hi';
>>>     set_capture_location $res '/foo';
>>>     if ($res ~ 'xxx') { ... }
>>>     set_capture_subrequest $res POST '/bar' 'body here';
>>>     if ($res ~ 'xxx') { ... }
>>>     ....
>>>
>>> I'll ask Marcus Clyne if he has any plan to add support for such
>>> things to his set_var submodule in his grand NDK project. Then an
>>> ngx_capture module should be straightforward ;)
>
> --
> Best regards,
> Valery Kholodkov
>
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://nginx.org/mailman/listinfo/nginx






More information about the nginx mailing list