TTFB low only after refresh page

I have been trying to check with different page rules but didnt find solution to this why is it not caching first time but it is not showing cache on next day , so only after refresh it does show cache as HIT always .

Below are the settings i done, i am thinking this could be something to do with page rules. would appreciate if anyone could help me . i want the TTFB to be low for the website.

SSL Certificates

Edge Certificates
Always Use HTTPS - On
Opportunistic Encryption - On
TLS 1.3 - On
Automatic HTTPS Rewrites - On

Speed

Brotli - On

Caching

Caching Level - Standard
Browser Cache TTL - 1 Month
Always Online™ - On

Page Rules

https://www.Domainexample.com/*
Cache Level: Cache Everything, Edge Cache TTL: a month

Below are first time i put the URL on this tool and after second time i put the URL immediately first time it shows as cf-cache-status - EXPIRED , then immediately after i request in the tool it shows as HIT
my website has SSL Certificate from the server

status 200

content-type text/html; charset=UTF-8

set-cookie cfduid=d4fc259e9288fc3c4af6fd75631dead871585998871; expires=Mon, 04-May-20 11:14:31 GMT; path=/; domain=.domainexample; HttpOnly; SameSite=Lax; Secure

cache-control max-age=2678400

expires Mon, 04 May 2020 11:14:31 GMT

host-header 5d77dd967d63c3104bced1db0cace49c

x-proxy-cache MISS

cf-cache-status EXPIRED

Status 200

content-type text/html; charset=UTF-8

set-cookie cfduid=d7c9f2dbcad6c06bbc559b8d9b40f071d1585998077; expires=Mon, 04-May-20 11:01:17 GMT; path=/; domain=.domainexample; HttpOnly; SameSite=Lax; Secure

cache-control max-age=2678400

expires Mon, 04 May 2020 10:59:25 GMT

host-header 5d77dd967d63c3104bced1db0cace49c

x-proxy-cache MISS

cf-cache-status HIT

server cloudflare

Any help would be appreciated

  • That’s how a Pull cache works. If a resource is never used, it’s never cached. So the first time a resource is called, it has to go to the origin server to get it, and that takes time.

  • Every edge cache at Cloudflare is independent, so the next visit that goes through that same edge server in that datacenter will get a HIT.

  • Resources that are used infrequently are the first ones to be evicted from the cache to make room for other requests.

Thanks for reply, if i upgrade to pro or business plan, will i get better Cache Hit if i take any of these plans?

changing the Edge Cache TTL: a month to Edge Cache TTL: 2 hours will this work?

The cache does not behave differently for different plan levels.

This only guarantees that the resource will be evicted after 2 hours. Within the 2 hours, it does not increase the odds of the resource staying cached.

Im looking for some clarification on the page rule function “Edge Cache TTL”

It’s my understanding that after the set period expires, the cached item will be removed from the Cloudflare cache. But Im not sure what happens next, does Cloudflare itself get a fresh copy of the item from the origin server or does the file have to be accessed by means of a user browsing the site?

When it expires, the process starts over. As a Pull CDN, someone has to request it again for it to get loaded into the cache.

This topic was automatically closed after 30 days. New replies are no longer allowed.