By default Cloudflare is conservative with caching and only caches specific static file types omitting HTML and other resources that may also be static for some users. You can get maximum performance from Cloudflare and cache other non-static file extensions by using Page Rules.
Go to Cloudflare.com > Choose your domain (upper left hand side) > Page Rules > Create Page Rule.
Now you can set the URL to match for instance: "www.example.com/*". The asterisk (*) is a wildcard character that can match any characters including no characters. For example, once implemented this rule would apply caching to https://www.example.com/index.html.
Next after adding the "Cache Level" setting choose "Cache Everything"
Once setup all resources matching the "Cache Everything" Rule will be cached by Cloudflare. You can find out more about setting up Page Rules in our Page Rules Tutorial.
You can verify your "Cache Everything" rule is working by following this guide on How to tell if Cloudflare is caching an asset.
We do offer more advanced caching configurations with Enterprise plans which have access to "Bypass cache on cookie" and "Custom Cache Keys" features to facilitate more granular control of caching.
It's important to note that Cloudflare will still respect Origin caching directive with this Page Rule in effect.
Cache-Control headers sending "private","no-cache", or "max-age=0" or Expires header with a date in the past will override the rule and cause Cloudflare to NOT cache the resource. To override these you'd need to add another setting called "Edge Cache TTL" and set it to however long you'd like Cloudflare to cache that resource on our servers.