Issue with 3rd-party memc and eval modules
Markus Jelsma
markus at buyways.nl
Fri Feb 19 13:07:19 MSK 2010
Hi,
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.
In pseudo:
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.
Cheers,
> It would actually help if you would share with us what are you trying to
achieve ;)
Markus Jelsma - Technisch Architect - Buyways BV
http://www.linkedin.com/in/markus17
050-8536620 / 06-50258350
More information about the nginx
mailing list