I am sure there is a better way but here is a suggestion. Use the rate
limit to identify when there is more than one connection per minute and
redirect that to the cache, if it doesnt hit that limit then you can use the
cache_bypass. Not sure if this would work hope someone can confirm, but a
thought.
limit_req_zone $binary_remote_addr zone=one:10m rate=1r/m;
location / {
limit_req zone=one burst=1 nodelay;
error_page 503 = @cached;
set $http_my_secret_header "0"; proxy_cache_bypass $http_my_secret_header;
location @cached {
proxy_pass
}
Rami
On Tue, Jul 26, 2011 at 5:55 AM, Dennis Jacobfeuerborn <
dennisml@conversis.de> wrote:
> Hi,
> what is the easiest way to force all request to be satisfied from the cache
> for lets say a minute? What I'm basically trying to do is to rate-limit the
> requests to the proxy upstream so that the upstream server will see no more
> than for example one request per minute for a specific url.
>
> Regards,
> Dennis
>
> ______________________________**_________________
> nginx mailing list
> nginx@nginx.org
> http://mailman.nginx.org/**mailman/listinfo/nginxhttp://mailman.nginx.org/mailman/listinfo/nginx
>
--
Cheers,
Rami
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx