ngx_http_memcached_module question
Igor Sysoev
is at rambler-co.ru
Fri Feb 29 23:39:02 MSK 2008
On Fri, Feb 29, 2008 at 03:19:35PM -0500, Sean Allen wrote:
>
> On Feb 29, 2008, at 2:02 PM, Sean Allen wrote:
>
> >
> >On Feb 29, 2008, at 1:25 PM, Sean Allen wrote:
> >
> >>
> >>On Feb 29, 2008, at 11:28 AM, Igor Sysoev wrote:
> >>
> >>>On Thu, Feb 28, 2008 at 05:09:18PM -0500, Sean Allen wrote:
> >>>
> >>>>can i do the following:
> >>>>
> >>>>check memcache for existence of content.
> >>>>
> >>>>if not continue our normal processing which is currently:
> >>>>
> >>>>check for static file
> >>>>if it exists, serve it
> >>>>if it doesnt exist, pass request off to upstream server.
> >>>
> >>>The checking local file is faster than memcached, so:
> >>>
> >>> location / {
> >>> error_page 404 = @memcache;
> >>> }
> >>>
> >>> location @memcache {
> >>> set $memcached_key "$uri?$args";
> >>> memcached_pass ...
> >>>
> >>> recursive_error_pages on;
> >>>
> >>> error_page 404 = @upstream;
> >>> }
> >>>
> >>> location @upstream {
> >>> proxy_pass ...
> >>>
> >>> error_page 404 = @upstream;
> >>> }
> >>
>
> Sorry for the noise. Managed to work through a number of things myself
> with some help from google and dumb luck.
>
> Routing all POST requests away from the error_page 404 = @memcache;
> took care of the 405 issue.
ngx_http_memcached_module does not support POST now.
It seems there should be "memcached_post" like "static_post".
Or event allow POST to memcached by default.
> Questions I have left:
>
> is there a way to hash the "$uri?$args" with something like md5 to
> keep a really long arg string from
> going beyond the max memcache key size?
No.
> is there a way to selectively not log the file not found errors that
> using error_page to redirect creates
> while at the same time preserving 'real' errors?
What error types do you want to hide ?
> Thanks for all the help you have already given on this Igor. I wouldnt
> have come close to getting this
> near to done without your assistance.
--
Igor Sysoev
http://sysoev.ru/en/
More information about the nginx
mailing list