Hi @laucoste,
First of all, let me fix the terminology error you have made. You see when it comes to caching technology be especially CDN level caching (like Cloudflare or any other CDN) the term that is used to mention how long the cached content will be valid is called max-age
or some version of max-age which basically sets the cache time of other things like s-max-age
. Anyways so in this question where you say TTL
that should be max-age
.
Logged out users must have 10 min cache
After you install, activate & set up the plugin, if you go under the Cache
tab inside the plugin settings, the first two option you will see is as follows:
Cloudflare Cache-Control max-age
Browser Cache-Control max-age
So, basically the first one says for how long your content will be cached on Cloudflare CDN edge servers and the second option says for how long the browser should cache the content so that it doesn’t have to contact Cloudflare server over and over again. Now if anyone refreshes the page before browser cache expires the browser can load the contents very fast from its cache.
Now in your case, as you want only 10 min cache of your content in Cloudflare CDN server and in your origin server (honestly I don’t know why you wanna do that as this will throw a lot of errors in Google Page speed and other speed testing tool saying you are not caching your content long enough – anyways your site your choice).
You should set the:
Cloudflare Cache-Control max-age
should be 600.
Fallback cache TTL
should be 600
A few more note:
- Once you have set up this plugin you should not change the
Browser caching TTL
option inside Cloudflare dashboard. It should always be Respect HTTP Header
as all the headers are being set by this plugin.
- I don’t know why you are using
HTTP Headers
plugins, you definitely don’t need it for HSTS. You can set up HSTS inside Cloudflare dashboard only. You don’t need any plugins for that.