trafficserver-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Divittorio, Vincenzo" <>
Subject RE: [External] Re: how manage headers in cache
Date Mon, 11 Feb 2019 13:08:30 GMT
I don’t want to add header in the response but to identiy an unique request I need to evaluate
URI request and only one header in the request.
You imagine that I have a rqeust that accept name in query param and surname in the header.
The response will return “Hello Name surname”. It means that to understand if the request
is unique or not, if the request is already present or not I need to evaluate also one header
in the request.

If I evaluate just the URI it is not sufficient

Request 1 /get/username?name=Peter
Surname: Green

Response Hello Peter Green

Request 2 /get/username?name=Peter
Surname: Black

Response Hello Peter Black

If I will evaluate just the header I will not able if we are talking about Peter Green or
Peter Black.
So finally how I can evaluate also an header in the request?


From: David Carlin <>
Sent: lunedì 11 febbraio 2019 13:52
To:; Divittorio, Vincenzo <>
Subject: [External] Re: how manage headers in cache


What if you add "Vary:  Surname" header to the origin response?<>

Also be aware of this ATS setting which controls the maximum number of alternates for an object
in cache (for a given URI):<>

If you expect lots of alternates, I would consider the cachekey plugin so that you can make
the request header part of the cache key:<>


On Mon, Feb 11, 2019 at 7:43 AM Divittorio, Vincenzo <<>>
Hi all,
I’m using ATS as reverse proxy cache.
It works for HTTP GET request with parameter in URL.
My question is: can we add to the request key also some headers?

This is the example: I have following request
URI: http://myhost:myport/cxf/stubs/ats/username?name=Peter<>

  *   Surname: Green
  *   Timestamp: 1234567890
  *   Content-type: application/json

  *   Response:
    "output": "hello Peter Green"

Now, ATS works until when the URI is always the same. If I change in the header Surname=Black,
it goes to retrieve data from cache but in this case is should be forwarded to backend because
the surname is different.

What I want to do it to accept as key of request (to verify if it exists or not) also an header
whitelist in order to say ok you have to retrieve from cache not just if the URI is the same
but if uri + surname header value are the same.
How I can include some headers to identify if the request (as a key) is an entry of my cache?


This message is for the designated recipient only and may contain privileged, proprietary,
or otherwise confidential information. If you have received it in error, please notify the
sender immediately and delete the original. Any other use of the e-mail by you is prohibited.
Where allowed by local law, electronic communications with Accenture and its affiliates, including
e-mail and instant messaging (including content), may be scanned by our systems for the purposes
of information security and assessment of internal compliance with Accenture policy. Your
privacy is important to us. Accenture uses your personal data only in compliance with data
protection laws. For further information on how Accenture processes your personal data, please
see our privacy statement at
View raw message