I have started using cloudflare on my newly created website. I want all resources to served from cloudflare cache (including css, javascript everything). For that I have create rule in page rules yesterday:
cache level: cache everything
edge cache ttl: a month
After that I checked today most of resources showing:
cf-cache-status: MISS
when I checked again within its showing
cf-cache-status: HIT
But again after few hours when I checked again , again few sources showing “cf-cache-status: MISS”.
I need solution that everytime every resource served from cloudflare cache to reduce load time.
That month is not the minimum time for which the cache will hold the resource, but the maximum time. If that file is not regularly requested Cloudflare will remove it from the cache way earlier.
Also, you should make sure you actually went via the same PoP as the caches are all PoP specific.
I basically want to know is there any method available that my website resources always served from cloudflare edge cache not from my main server ? (Because cloudflare server is very fast and my server is slow) And there’s no traffic on my website as my website is new so resources files are not regularly requested.
Is there any perfect solution available for this ?
If you want to guarantee that things are served by Cloudflare you’d need to use Workers and serve them directly from e.g. KV. The cache will never give you a guarantee. Cloudflare can optimise your site’s performance but your site should be sufficiently fast enough on its own.