No Cache with "Cache-Control: public, max-age=1, s-maxage=2592000"

caching

#1

I’m using http to test caching of a website. A response returned with the following header without
CF-Cache-Status. I have Standard caching level, respect existing header and development mode turned off. Why cloudflare isn’t caching the resource?

Accept-Ranges:bytes
Cache-Control:public, max-age=1, s-maxage=2592000
Connection:keep-alive
Date:Fri, 02 Feb 2018 10:32:59 GMT
ETag:W/"2e05a-1615549dccf"
Last-Modified:Fri, 02 Feb 2018 06:52:39 GMT
Server:nginx/1.8.0
X-Powered-By:Express

#2

There’s nothing in those headers that indicate the request went through Cloudflare at all. Is the record you’re trying to test with :orange: in Cloudflare DNS? You should at a minimum see a cf-ray header. See example from your main site below (edited).

curl -I https://your.domain/app.js
HTTP/2 200
date: Fri, 02 Feb 2018 14:13:34 GMT
content-type: application/javascript
last-modified: Mon, 22 Jan 2018 10:27:51 GMT
vary: Accept-Encoding
x-cache: Hit from cloudfront
cf-cache-status: HIT
expect-ct: max-age=604800, report-uri=“https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct
server: cloudflare
cf-ray: 3e6dc0797d247f06-SFO-DOG

Also check the type of content vs our default caching types to make sure it would be expected to be cached:


#3

Yes, I forgot to enable it by clicking that orange cloud icon. Thanks for your help