Cloudflare CDN

hkhkhkhkhk123

Regular Member
Joined
May 26, 2021
Messages
412
Reaction score
147
Hi folks, I am wondering if Cloudflare CDN is doing the cache, why would people use the WordPress cache plugin?
The CDN itself does the cache work, doesn't it?
Do you have to use them both?
Thanks
 
Hi folks, I am wondering if Cloudflare CDN is doing the cache, why would people use the WordPress cache plugin?
The CDN itself does the cache work, doesn't it?
Do you have to use them both?
Thanks
Use both. They do slightly different things. A local cache plugin will pre-generate pages for quicker access while Cloudflare will cache static resources that don't need to be generated each time.
 
Both are different the wordpress cache plugin is serverside cf and cdn-side
 
Both are different the wordpress cache plugin is serverside cf and cdn-side
 
WP Cache is useful so that you do not recreate pages for every visit.
If nothing is cached at Cloudflare, then it will hit your origin server. So, having cached copy helps to speed up caching at CF edge + it loads faster for end user.
The thing with Cloudflare is, all the edge locations are independent and have separate caches. So, If user from UK visits your site, first time there will be no cached copy so it will simply request it from origin server and cache it. For subsequent UK visitors, it will simply serve this cached copy. Now, If another user from Canada visits your page, it will not be cached in Canadian pop/ edge. Again, it will hit your origin and cache it on the edge. For subsequent visits from Canada, it will serve cached copy.

In case of Cloudflare APO, it allows access to workers. Basically, if it encounters an edge location which doesn't have the page cached, it will simply request it from the closest Cloudflare edge location rather than your origin.

If you are not willing to spend $5, you can warm up caches from multiple locations so cached copy of your site is present on edge servers. Checkout this site on how to do this -
Code:
https://community.cloudflare.com/t/warming-up-cache-geographically-using-webpagetest/35447/2
 
WP Cache is useful so that you do not recreate pages for every visit.
If nothing is cached at Cloudflare, then it will hit your origin server. So, having cached copy helps to speed up caching at CF edge + it loads faster for end user.
The thing with Cloudflare is, all the edge locations are independent and have separate caches. So, If user from UK visits your site, first time there will be no cached copy so it will simply request it from origin server and cache it. For subsequent UK visitors, it will simply serve this cached copy. Now, If another user from Canada visits your page, it will not be cached in Canadian pop/ edge. Again, it will hit your origin and cache it on the edge. For subsequent visits from Canada, it will serve cached copy.

In case of Cloudflare APO, it allows access to workers. Basically, if it encounters an edge location which doesn't have the page cached, it will simply request it from the closest Cloudflare edge location rather than your origin.

If you are not willing to spend $5, you can warm up caches from multiple locations so cached copy of your site is present on edge servers. Checkout this site on how to do this -
Code:
https://community.cloudflare.com/t/warming-up-cache-geographically-using-webpagetest/35447/2
this is exactly what I am looking for. No one on the internet tells me that.

I used Apo one time, it was impressive. It didn't last too long as I accidentally deleted the site on Cloudflare. The apo has gone.
 
this is exactly what I am looking for. No one on the internet tells me that.

I used Apo one time, it was impressive. It didn't last too long as I accidentally deleted the site on Cloudflare. The apo has gone.

APO is good, no doubt about that. But you can do the same with free account as well. :D
For blogs, I simply set the cache expiry for 30 days on CF. The home page/ individual pages are purged automatically by LS Cache plugin on updates, provided you have set up the API credentials in LS Cache plugin.
 
APO is good, no doubt about that. But you can do the same with free account as well. :D
For blogs, I simply set the cache expiry for 30 days on CF. The home page/ individual pages are purged automatically by LS Cache plugin on updates, provided you have set up the API credentials in LS Cache plugin.

1. Since I don't want to pay for APO, I don't want to pay for the LS Cache plugin either. Otherwise, I would have paid for APO in the first place as I am a believer in minimal plugins.
2. As you said earlier, the first visitor who comes to your website will hit your original server. So, is there a way that once I purge the cache, then automatically all the edges get "re-loaded"?
Thanks.
 
1. Since I don't want to pay for APO, I don't want to pay for the LS Cache plugin either. Otherwise, I would have paid for APO in the first place as I am a believer in minimal plugins.
2. As you said earlier, the first visitor who comes to your website will hit your original server. So, is there a way that once I purge the cache, then automatically all the edges get "re-loaded"?
Thanks.

1. LsCache is free plugin, useful if your host is using Litespeed.
2. You will have to do cache warmup. Just create list of URLs and run them one by one.
 
1. LsCache is free plugin, useful if your host is using Litespeed.
2. You will have to do cache warmup. Just create list of URLs and run them one by one.
Mine host uses bitnami to run wordpress.
 
Back
Top