What is static files cache lifetime?
I mean how long CF keep static files?
css, js, jpg, etc.
This topic may be useful for you:
You can overwrite the edge cache TTL using Cache Rules.
And do not confuse with browser cache TTL, which dictates how much time does the browser store the static files. You can change that configuration in the Cache Configuration page.
Hope it helps!
Which are kept in visitor’s Web browser? By default, I remember Browser Cache TTL is set to 4 hours and it includes the file extensions as follows in the link from below:
At the Cloudflare Edge / POP we can configure it, also the minimum TTL depends on the plan type as described:
Other useful article if you’d want to control this from your origin host/server and would like to configure Cloudflare tor espect the HTTP cache-control headers:
Using Page Rules, or nowadays Cache Rules, we can configure as we need:
Not clear for me.
On my server I set nginx rules - 180 days lifetime for static files.
On Cloudflare Browser Cache TTL I set respect existing headers.
I’m testing this page https://directory.audio in Google Page Speed Insights and getting warnings about cache of static files = 30 days.
What else I should to configure?
OK, I purged Cloudflare cache and now static files have correct cache lifetime - 180 days.
So, if we change lifetime cache on server to get results we need to purge all Cloudflare cache.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.