Hacker News new | ask | show | jobs
by singlow 2349 days ago
It is optional to let CloudFlare cache the content. I believe you can control it from the CloudFlare control panel as well as affect it from your HTTP headers. So I bet they have the feature enabled on the panel but their HTTP headers tell CloudFlare not to cache the page, maybe accidentally.
1 comments

It is caching the static assets (js, css, png, etc) based on default extensions[1]. The page itself is dynamic, likely for the comment feature at the bottom of the page. If they wanted to cache it, they could probably add some caching headers (have to change the responses on the origin) or a Page Rule in cloudflare (and not have to change anything on the server). But that won't be a good idea if people can login to the page to comment (not sure if CloudFlare can tell if someone is not-logged-in and return a cached version; that would be interesting). I see CF-Cache-Status: DYNAMIC header, which is:

"The resource content type was not cached by default and your current Cloudflare caching configuration doesn't instruct Cloudflare to cache the resource. Instead, the resource was requested from the origin web server. Use Page Rules to implement custom caching options."

[1] https://support.cloudflare.com/hc/en-us/articles/200172516-U...

Cookie-based cache by-pass is a premium paid-only feature last time I used CloudFlare.