Welcome! Log In Create A New Profile

Advanced

Re: proxy_cache not honoring pragma/cache-control settings

June 05, 2011 02:16AM
On Sun, Jun 05, 2011 at 01:55:03AM -0400, pk899 wrote:
> Hi, from the documentation I understand that proxy_cache will NOT be
> activated for pages that have pragma to "no-cache" or Cache-control to
> "no-cache", or even Expires to an old date.
>
> I have the following in my Location settings:
>
> proxy_cache_bypass $http_pragma $http_authorization;
> proxy_no_cache $http_pragma $http_authorization;
>
>
> And this at the top of my PHP pages that I do not want cached, as they
> change often and for the logged in user:
>
>
> header("Cache-control: private, no-cache, must-revalidate");
> header("Expires: Mon, 24 Sep 1997 05:00:00 GMT"); # Past date
> header("Pragma: no-cache");

"Pragma: no-cache" sent from server side means nothing.
$http_pragma means client "Pragma" header.

> However, these pages are still being cached.
>
> Any insight on what I am missing?

nginx should not cache response with such Cache-Control and Expires.
Do you have proxy_ignore_header directive ?


--
Igor Sysoev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://nginx.org/mailman/listinfo/nginx
Subject Author Posted

proxy_cache not honoring pragma/cache-control settings

pk899 June 05, 2011 01:55AM

Re: proxy_cache not honoring pragma/cache-control settings

Igor Sysoev June 05, 2011 02:16AM

Re: proxy_cache not honoring pragma/cache-control settings

pk899 June 05, 2011 02:20AM

Re: proxy_cache not honoring pragma/cache-control settings

pk899 June 05, 2011 02:23AM

Re: proxy_cache not honoring pragma/cache-control settings

Igor Sysoev June 05, 2011 02:26AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 99
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready