0

I'm setting up an nginx - apache reverse proxy where nginx handles the static files and apache the dynamic. I have a search engine and depending on search parameter I either directly forward the user to the page they are looking for or provide a set of search results.

I cache these results in memcached as

key:/search.cgi?q=foo
value: LOCATION:http://www.example.com/foo.html

and

key:/search.cgi?q=bar
value: CONTENT-TYPE: text/html

<html>
....
....
</html>

I can pull the "Content-type...." values out of memcached using nginx and send them to the user, but I can't quite figure out how to handle a returned value like "Location..."

Can I?

1 Answer 1

0

From what I can tell, the nginx memcached module can only store the raw contents of the request, be it a gif, html, whatever. It would be unable to interpret your LOCATION parameter without hacking the module up. (Not recommended)

To use nginx in this manner you would have to use memcached to store the actual html content of the page specified by the LOCATION field, and store that in your memcached instead, or use a set of redirects in another manner.

You must log in to answer this question.