<p class="MsoNoSpacing">Hi all,</p>
<p class="MsoNoSpacing">Can someone please help me on this? The pattern is
similar to </p>
<p class="MsoNoSpacing">proxy_cache_use_stale updating</p>
<p class="MsoNoSpacing">but just that the backend request is a fire-and-forget. </p>
<p class="MsoNoSpacing">If I am to do this in SSI I’ll end up spending time to service
the code path in SSI whereas there is no much need to that urgently. </p>
<p class="MsoNoSpacing">The next cache bypass will update it and that’s good
enough for me. </p>
<p class="MsoNoSpacing">-Quintin</p><br><div class="gmail_quote">On Tue, Apr 3, 2012 at 12:13 PM, Quintin Par <span dir="ltr"><<a href="mailto:quintinpar@gmail.com">quintinpar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<p></p><p>Hi all,</p><p>I have a strange case, not sure if this is addressed by
nginx yet </p>
<p>My site is cached as follows. </p>
<p class="MsoNormal"> location = / {</p>
<p class="MsoNormal"> proxy_pass <a href="http://localhost:82" target="_blank">http://localhost:82</a>;</p>
<p class="MsoNormal"> proxy_set_header Host $host;</p>
<p class="MsoNormal">
proxy_set_header X-Real-IP $remote_addr;</p>
<p class="MsoNormal">
proxy_set_header
X-Forwarded-For
$proxy_add_x_forwarded_for;</p>
<p class="MsoNormal"> proxy_set_header
Accept-Encoding "";</p>
<p class="MsoNormal">
proxy_ignore_headers Set-Cookie; </p>
<p class="MsoNormal"> proxy_ignore_headers
Cache-Control; </p>
<p class="MsoNormal">
proxy_ignore_headers Expires; </p>
<p class="MsoNormal">
proxy_ignore_headers X-Accel-Expires; </p>
<p class="MsoNormal"> add_header
X-Cache-Status $upstream_cache_status;</p>
<p class="MsoNormal"> proxy_cache cache;</p>
<p class="MsoNormal">
proxy_cache_key
$scheme$host$request_uri$cookie_site_sessionid; </p>
<p class="MsoNormal">
proxy_cache_valid 200 302
30s;</p>
<p class="MsoNormal">
proxy_cache_use_stale updating;</p>
<p class="MsoNormal"> }</p>
<p>One issue I encounter with this is that I can’t increment
the page view counter that I maintain in redis. </p>
<p>Is there is way nginx can fire a request to the backend
web – to some URI so that I can take the request and increment the associated
counter? </p>
<p>I know I can achieve this with SSI, but I wanted to check
if there is a better pattern. </p><span class="HOEnZb"><font color="#888888"><p>-Quintin</p><p></p>
</font></span></blockquote></div><br>