We just started using CF about 3 hours ago. Our site is a SPA with 3 resources served from our origin - html, css and js. Our analytics show 90% of our requests as cached, but none of the requests in our browser and on CF-Cache-Status are hits. Is this because the edge we are hitting hasn’t cached them?
Do you have any Page Rules set? If you don’t, you may need to create one that specifies how long to keep the cache on the edge server.
Look at the Edge Cache TTL & Browser Cache TTL section of the link above.
- ourdomain/* forwarding url to www.ourdomain
- http://ourdomain/ always use https
- *www.ourdomain/ cache level standard
- www.ourdomain/api/ cache bypass
- sockets.ourdomain/ cache bypass
- ourdomain/assets/ cache everything
I usually have a rule for
example.com/assets/* with the following options:
- Browser Cache TTL: 4 hours,
- Cache Level: Cache Everything,
- Edge Cache TTL: a month
Thanks. That did it!
This topic was automatically closed after 31 days. New replies are no longer allowed.