Welcome! Log In Create A New Profile

Advanced

Re: missed proxy_cache with Cache-Control headr

Maxim Dounin
December 03, 2009 06:40AM
Hello!

On Thu, Dec 03, 2009 at 06:19:16AM -0500, joshua wrote:

> Hello,
>
> I've been playing with the proxy_cache and am having trouble determining the intended behavior.

[...]

> When receiving a generated image from the backend through this location, here is the result when I set the Cache-Control header with a max-age:
>
>
> 03/Dec/2009:11:03:03 +0000 MISS Cache-Control: max-age=315576000, public Expires: - "GET /person/avatar.png HTTP/1.1" (200) "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_2; en-us) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10"
>
> The cache always misses here, leading me to believe this item is marked to not be cached. In the following two situations, the item is cached. This is when Cache-control is set to just 'public' or s-maxage is set. In other words, it seems like the presence of max-age stops the item from being cached.
>
> 02/Dec/2009:11:34:18 +0000 HIT Cache-Control: public Expires: Mon, 02 Dec 2019 11:32:09 GMT "GET /person/avatar.png HTTP/1.0" (200) "ApacheBench/2.3"
> 02/Dec/2009:11:35:27 +0000 HIT Cache-Control: public, s-maxage=315576000 Expires: Mon, 02 Dec 2019 11:35:23 GMT "GET /person/avatar.png HTTP/1.1" (200) "curl/7.19.6 (i386-apple-darwin10.0.0) libcurl/7.19.6 OpenSSL/0.9.8l zlib/1.2.3 c-ares/1.6.0"
>
> Please let me know what the intended behavior here is.

Looks like you are using 0.7.* and hit the bug fixed in 0.8.20:

*) Bugfix: nginx did not treat a comma as separator in the
"Cache-Control" backend response header line.

This fix wasn't yet merged into 0.7.* branch.

Maxim Dounin

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

missed proxy_cache with Cache-Control headr

joshua December 03, 2009 06:19AM

Re: missed proxy_cache with Cache-Control headr

Maxim Dounin December 03, 2009 06:40AM

Re: missed proxy_cache with Cache-Control headr

joshua December 03, 2009 07:53AM

Re: missed proxy_cache with Cache-Control headr

joshua December 03, 2009 03:59PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 174
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