<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto">You need to understand what requests are being received, what responses are being sent and the actual keys being used to write to your cache. <div><br></div><div>This means intelligent request logging, possibly use of <a href="http://redbot.org">redbot.org</a>, and examination of your cache. I used to use a script that someone had posted here years ago that would dump cache contents along with cache keys.<br><br><div id="AppleMailSignature" dir="ltr">Sent from my iPhone</div><div dir="ltr"><br>On Oct 6, 2018, at 5:51 PM, Jane Jojo <<a href="mailto:janejojo@gmail.com">janejojo@gmail.com</a>> wrote:<br><br></div><blockquote type="cite"><div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;color:#000000"><p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Here’s the issue in action [video]: <a href="https://d.pr/v/HmAiK0" style="color:rgb(5,99,193)">https://d.pr/v/HmAiK0</a> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">I am using Nginx http caching extensively with the following cache key</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_key "$scheme://$host$uri";</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">I know this is a cache issue because I can invalidate it with</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_bypass $arg_nocache;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Here’s a video of that in action: <a href="https://d.pr/v/Bj5ey6" style="color:rgb(5,99,193)">https://d.pr/v/Bj5ey6</a> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Now, this happens only to the homepage URL and the problem recurs after a while (I think after the cache expiry).</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Can you help me understand why this is happening and what I can do to fix?</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">Here’s my code for reference:</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">charset utf-8;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_valid   200 301 302 1d;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_redirect off;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_valid 404 1m;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_revalidate on;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_background_update on;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_lock on;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_use_stale  error timeout invalid_header updating http_500 http_502 http_503 http_504;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif">proxy_cache_bypass $arg_nocache;</p>

<p class="MsoNormal" style="margin:0in 0in 0.0001pt;font-size:12pt;font-family:Calibri,sans-serif"> </p></div><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><br></div></div></div>
</div></blockquote><blockquote type="cite"><div dir="ltr"><span>_______________________________________________</span><br><span>nginx mailing list</span><br><span><a href="mailto:nginx@nginx.org">nginx@nginx.org</a></span><br><span><a href="http://mailman.nginx.org/mailman/listinfo/nginx">http://mailman.nginx.org/mailman/listinfo/nginx</a></span></div></blockquote></div></body></html>