Welcome! Log In Create A New Profile

Advanced

Changing sources: Memcached module variant

June 17, 2009 11:35AM
Hi everyone,

I'm having a hard time going through the sources of the memcached module, finding the thread of things. I need to do a small change in this module's behaviour, namely setting a URL in a var that will be accessible in config so that I can use that var to proxy a request for the real content. So, instead of sending a cache hit's content directly to the user, I want the memcached module to populate a URL in a variable that will be picked up by the next line in the config in order to proxy a request to it, and only then serve it's content to the user.

Right now the memcached module's current behaviour makes sense for caching html and images. In my case I need to have a map for URLs like this:

key = URL sent by client
value = masked URL for which we will get the content and proxy it

I don't really want to sound like a pussy or anything - I know my way around C - but I'm finding it hard to know where to start... The things I need are disable the response build and sending to the user after there is a cache hit, and instead populate a variable that will be accessible in config space. The proxy module should take care of things from there on. I probably need to break something in ngx_http_memcached_pass, and I have no freaking clue on how to set up a variable for config space.

Please, any help from the more experienced guys?
Thank you.
Subject Author Posted

Changing sources: Memcached module variant

matamouros June 17, 2009 11:35AM

Re: Changing sources: Memcached module variant

MichaƂ Jaszczyk June 17, 2009 03:05PM

Re: Changing sources: Memcached module variant

matamouros June 18, 2009 06:53AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 77
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready