Issue with 3rd-party memc and eval modules
markus at buyways.nl
Fri Feb 19 13:07:19 MSK 2010
In the end, i need two pieces of server side logic:
1) HTTP request filter that looks up a key in memcache (specified in a
cookie). Then, an additional lookup is required and finally either the URL can
be rewritten or the original cookie can be overwritten.
request.cookie.token = memcache_get(memcache_get(request.cookie.token));
Of course, some validation checks need to be executed such as verifying if the
client's IP address is actually linked to the token.
This part already works and uses two eval blocks.
2) A HTTP request with multiple parameters needs to be processed and a cookie
needs to be set (eval) which value is a random hash generated by some backend
(eval), that value then will be stored in memcache as well (eval) as a HTTP
specified token. This step is a token synchronization process that initializes
a session so it can be called using the logic above.
This second part is filled with checks, validations etc and is hard to
implement because of order of exection (eval before rewrite). But i really
need rewrite's conditional statement a lot of times. Splitting it all up in
seperate named locations is quite a challenge.
Doing all this in the config would be nice but on the other hand making a
module for it would be even better. It would be some sort of combination of
the memcache module and user_id module.
> It would actually help if you would share with us what are you trying to
Markus Jelsma - Technisch Architect - Buyways BV
050-8536620 / 06-50258350
More information about the nginx