Nginx cache returning empty response for just the home page

Jane Jojo janejojo at gmail.com
Sat Oct 6 21:51:47 UTC 2018


Here’s the issue in action [video]: https://d.pr/v/HmAiK0



I am using Nginx http caching extensively with the following cache key



proxy_cache_key "$scheme://$host$uri";



I know this is a cache issue because I can invalidate it with



proxy_cache_bypass $arg_nocache;



Here’s a video of that in action: https://d.pr/v/Bj5ey6



Now, this happens only to the homepage URL and the problem recurs after a
while (I think after the cache expiry).



Can you help me understand why this is happening and what I can do to fix?



Here’s my code for reference:

charset utf-8;

proxy_cache_valid   200 301 302 1d;

proxy_redirect off;

proxy_cache_valid 404 1m;

proxy_cache_revalidate on;

proxy_cache_background_update on;

proxy_cache_lock on;

proxy_cache_use_stale  error timeout invalid_header updating http_500
http_502 http_503 http_504;

proxy_cache_bypass $arg_nocache;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20181007/7c05f8a6/attachment.html>


More information about the nginx mailing list