Question

Subject: Content not Being Cached
After activating Cloudflare on my site, I am seeing that resources on my pages are not being cached:
curl -svo /dev/null roskolniv.us
* Rebuilt URL to: roskolniv.us/
* Trying 104.16.27.128...
* Connected to roskolniv.us (127.0.0.1) port 80 (#0)
> GET / HTTP/1.1
> User-Agent: curl/7.40.0
> Host: roskolniv.us
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Mon, 22 Jun 2015 03:03:59 GMT
< Content-Type: text/html; charset=utf-8
< Transfer-Encoding: chunked
< Connection: keep-alive
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0, max-age=0
< Strict-Transport-Security: max-age=10
< X-Powered-By: Express
< Server: cloudflare-nginx
< CF-RAY: 1fa4b922fef517a4-SIN
<
{ [3507 bytes data]
* Connection #0 to host roskolniv.us left intact
Why is Cloudflare's caching not working on my site?
		

Answer

Hello,

Thanks for reaching out to Cloudflare support.

By default, Cloudflare does not cache all content, but only URLs with specific file extensions. Please see https://developers.cloudflare.com/cache/concepts/default-cache-behavior/ for more details on this.

It was not cached in this case as you requested the root URL, which does not match any of those extensions. You can set up a cache rule at https://dash.cloudflare.com/?to=/:account/:zone/caching/cache-rules/new to cache the root URL as well.

Please let me know if you need further details.

Thank you very much,
Alexander

Reasoning

The curl call simply requests the root path and if there is no explicit configuration that will obviously not be cached.

Tools to use: curl