Welcome! Log In Create A New Profile

Advanced

Cache 404 & 500 pages

Quintin Par
January 15, 2012 02:00AM
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
_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Cache 404 & 500 pages

Quintin Par January 15, 2012 02:00AM

Re: Cache 404 & 500 pages

Maxim Dounin January 15, 2012 06:14AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 303
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready