Cache 404 & 500 pages

Quintin Par quintinpar at gmail.com
Sun Jan 15 06:57:41 UTC 2012


Hi all,

When I attempt caching these pages as shown below

        error_page  404        /404.html;

        location = /404.html {

                    root /var/www/prod /templates/;

                    internal;

                    add_header Cache-Control public;

                    add_header X-Cache-Status $upstream_cache_status;

                    proxy_cache             generalcache;

                    proxy_cache_key         backend$request_uri;

                    proxy_cache_use_stale   updating;

        }

I don’t see the X-Cache-Status header in the html response. Does that mean
the page does not get cached?

-Quintin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20120115/98597dc1/attachment.html>


More information about the nginx mailing list