Hi Bryan, Miles and Brennan, 
    The tool is really useful, I wish I knew it earlier. :) 
    And I think what Miles has proposed is what I need, I want to fetch the 
response from ATS only when it is cached, if it is not, I go other routes. 
Thank you very much! 


Jason 


> On Mar 27, 2019, at 17:19, Fieck, Brennan <[email protected]> wrote:
> 
> I think `-IXGET` will cause *curl* to drop the body - ATS still serves it to 
> you. Assuming ATS respects that Cache-Control header, then you should be fine 
> to just send a `HEAD` request if you don't want the body. Although I think 
> for objects that are less than up to (roughly) equal to the average object 
> size, fetching the body will be a negligible additional cost as far as ATS is 
> concerned.
> 
> If what you're trying to do is see what's stored in your cache, I shamelessly 
> recommend the buggy-but-useful Superior Cache ANalyzer (SCAN) tool: 
> https://github.com/comcast/superior-cache-analyzer
> ________________________________________
> From: Miles Libbey <[email protected]>
> Sent: Wednesday, March 27, 2019 3:10 PM
> To: [email protected]
> Subject: [EXTERNAL] Re: check whether it will be a hit on trafficserver
> 
> I do:
> curl -IXGET -H "Cache-Control: only-if-cached" 
> "https://protect2.fireeye.com/url?k=918b742c9b1bbda4.918b5398-c36456a0d5da6c67&u=http://myurlhere";
> 
> The -IXGET makes it do a GET, but, drops the body. The Cache-Control:
> only-if-cached request header will have ATS respond with a 200 if the
> object is in cache, otherwise you get a 504 if not in cache.
> 
> miles
> 
> 
> On Wed, Mar 27, 2019 at 11:49 AM Jason Yang <[email protected]> 
> wrote:
>> 
>> Hi community,
>>    Is there anyway to check whether a request will be a hit or miss without 
>> having trafficserver serving any content and not going to origin? (I think I 
>> can do HEAD, but it goes to origin). Thank you!
>> 
>> 
>> Best,
>> Jason

Reply via email to