trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Chilappagari, Sairam" <>
Subject Re: ATS is not abiding the cache-control's max-age in response header.
Date Mon, 09 May 2011 18:55:55 GMT
Thanks for the reply Leif. But I'm actually using response builder to build my response. This
is the stripped out version. But gives you a basic idea on how I'm doing it.

ResponseBuilderImpl builder = new ResponseBuilderImpl();




CacheControl cc = new CacheControl();




When I look at the response, this is what I'm seeing:

Date: Mon, 09 May 2011 16:32:49 GMT

Via: HTTP/1.1 (ApacheTrafficServer/2.0.1 [cHs f ])

Age: 19

Connection: keep-alive

Content-Length: 284

Server: ATS/2.0.1

Content-Type: application/json

Cache-Control: no-transform;max-age=30000

So do you think org.apache.cxf.jaxrs.impl.ResponseBuilderImpl is setting the headers wrong?
Or ATS is not taking this into consideration? I'm kind of new to ATS so forgive my ignorance.

One more question: If I just use max-age as my caching policy and nothing else, which value
am I supposed to use for CONFIG proxy.config.http.cache.required_headers? (1 or 2)?



From: Leif Hedstrom <<>>
Date: Mon, 9 May 2011 11:42:16 -0700
To: "<>" <<>>
Cc: Sairam Chilappagari <<>>
Subject: Re: ATS is not abiding the cache-control's max-age in response header.

On 05/09/2011 11:51 AM, Chilappagari, Sairam wrote:

I'm trying to control the ATS's cache based on the max-age parameter in the Cache-Control
response header. But Seems like ATS is not abiding this config. I tried setting the following

CONFIG proxy.config.http.cache.required_headers INT 1.  (Also tried setting it to 2).

In my response from server I'm setting just "Cache-Control: no-transform;max-age=30000". Am
I supposed to set anything else other than max-age? (like "Last-modified" or "expires")?

Any sort of pointers on why it's not working would be much appreciated.

Change "no-transform; max-age=30000" to "no-transform, max-age=30000"

',' is the only allowed separator for HTTP message headers, afaik (';' would typically be
used for additional parameters for the value).

-- Leif

View raw message