You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by GitBox <gi...@apache.org> on 2021/04/08 23:23:02 UTC

[GitHub] [trafficserver] mlibbey commented on issue #7671: Caching doesn't seem to work

mlibbey commented on issue #7671:
URL: https://github.com/apache/trafficserver/issues/7671#issuecomment-816297026


   FWIW, s-maxage is working for me on 8.1
   ====First Fetch===
   
   ```
   [16:12:02 httpbin]$ curl -sIXGET --resolve httpbin.local:80:127.0.0.1 "http://httpbin.local/response-headers?cache-control=s-maxage=18000,must-revalidate,max-age=0"
   
   HTTP/1.1 200 OK
   Server: ATS/8.1.2
   Date: Thu, 08 Apr 2021 23:13:15 GMT
   Content-Type: application/json
   Content-Length: 133
   cache-control: s-maxage=18000,must-revalidate,max-age=0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: b718216e7de28332
   Strict-Transport-Security: max-age=31536000
   Age: 0
   Connection: keep-alive
   Via: https/1.1 milesserver (ApacheTrafficServer/8.1.2 [uScMsSfWpSeN:t cCMp sS])
   X-Cache-Key: https://httpbin.org/response-headers?cache-control=s-maxage=18000,must-revalidate,max-age=0
   X-Cache: miss
   X-Remap: from=http://httpbin.local/, to=https://httpbin.org/
   ```
   
   
   
    ==== Should be served cached ... and is ====
   
   ```
   [16:13:15 httpbin]$ curl -sIXGET --resolve httpbin.local:80:127.0.0.1 "http://httpbin.local/response-headers?cache-control=s-maxage=18000,must-revalidate,max-age=0"
   
   HTTP/1.1 200 OK
   Server: ATS/8.1.2
   Date: Thu, 08 Apr 2021 23:13:15 GMT
   Content-Type: application/json
   Content-Length: 133
   cache-control: s-maxage=18000,must-revalidate,max-age=0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: b718216e7de28332
   Strict-Transport-Security: max-age=31536000
   Age: 13
   Connection: keep-alive
   Via: http/1.1 milesserver (ApacheTrafficServer/8.1.2 [uScHs f p eN:t cCHp s ])
   X-Cache-Key: https://httpbin.org/response-headers?cache-control=s-maxage=18000,must-revalidate,max-age=0
   X-Cache: hit-fresh
   X-Remap: from=http://httpbin.local/, to=https://httpbin.org/
   ```
   
   
   
   
    ==== New url and s-max-age ====
   
   ```
   [16:13:28 httpbin]$ curl -sIXGET --resolve httpbin.local:80:127.0.0.1 "http://httpbin.local/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0"
   
   HTTP/1.1 200 OK
   Server: ATS/8.1.2
   Date: Thu, 08 Apr 2021 23:13:59 GMT
   Content-Type: application/json
   Content-Length: 130
   cache-control: s-maxage=10,must-revalidate,max-age=0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: dc48a4e767d55e01
   Strict-Transport-Security: max-age=31536000
   Age: 0
   Connection: keep-alive
   Via: https/1.1 milesserver (ApacheTrafficServer/8.1.2 [uScMsSfWpSeN:t cCMp sS])
   X-Cache-Key: https://httpbin.org/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0
   X-Cache: miss
   X-Remap: from=http://httpbin.local/, to=https://httpbin.org/
   
   ```
   
    ==== Should be served cached ... and is ====
   ```
   [16:13:59 httpbin]$ curl -sIXGET --resolve httpbin.local:80:127.0.0.1 "http://httpbin.local/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0"
   
   HTTP/1.1 200 OK
   Server: ATS/8.1.2
   Date: Thu, 08 Apr 2021 23:13:59 GMT
   Content-Type: application/json
   Content-Length: 130
   cache-control: s-maxage=10,must-revalidate,max-age=0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: dc48a4e767d55e01
   Strict-Transport-Security: max-age=31536000
   Age: 8
   Connection: keep-alive
   Via: http/1.1 milesserver (ApacheTrafficServer/8.1.2 [uScHs f p eN:t cCHp s ])
   X-Cache-Key: https://httpbin.org/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0
   X-Cache: hit-fresh
   X-Remap: from=http://httpbin.local/, to=https://httpbin.org/
   
   ```
   
    ==== Should be stale ... and is ====
   
   ```
   [16:14:07 httpbin]$ curl -sIXGET --resolve httpbin.local:80:127.0.0.1 "http://httpbin.local/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0"
   
   HTTP/1.1 200 OK
   Server: ATS/8.1.2
   Date: Thu, 08 Apr 2021 23:14:11 GMT
   Content-Type: application/json
   Content-Length: 130
   cache-control: s-maxage=10,must-revalidate,max-age=0
   Access-Control-Allow-Origin: *
   Access-Control-Allow-Credentials: true
   X-B3-TraceId: a9c9b25db39da964
   Strict-Transport-Security: max-age=31536000
   Age: 0
   Connection: keep-alive
   Via: https/1.1 milesserver (ApacheTrafficServer/8.1.2 [uScSsSfUpSeN:t cCSp sS])
   X-Cache-Key: https://httpbin.org/response-headers?cache-control=s-maxage=10,must-revalidate,max-age=0
   X-Cache: hit-stale
   X-Remap: from=http://httpbin.local/, to=https://httpbin.org/
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org