admin avatar

Cloudflare not caching solution

🕑 by admin





Cloudflare is sometimes cached and sometimes not cached

After a month of troubleshooting, the problem of cloudflare not caching was finally solved

First of all, cloudflare does not cache html web pages. By default, it only caches static files, such as css, js files.

So how to make cloudflare cache the specified webpage or cache the content of the article? There are two ways

  1. The first type is to enable the source server cache control, and then add the cache identifier to the source site ~~~

This is a bit complicated and requires self-configuration and debugging. . . As shown below, enable cloudflare source server cache control

  1. The second method is relatively simple, and caches the specified webpage or article content directly in cloudflare

This method is very simple and rude. Well, it's fragrant to use! ~~~~ See the picture below

Let's take a look at the previous page request display is not cached

Set mandatory cache for the specified webpage in cloudflare, check the header information of the webpage again to show that it has been cached





💘 相关文章


📝 有偿服务

• 服务器合租380/年
• 服务器配置:2.4G,6核12线程
• nvme raid 1硬盘
• 不提供服务器自主面板
• 适合稳定的个人博客
• 提供备份服务,备份空间自备
• 只提供ipv6地址,搭配cloudflare使用
• 提供想要安装的程序和域名
• 博客必须是和谐健康的
• 博客不能是视频和图片站
• 提供以下付费服务
• 建站,FTP,备份,Linux,Wordpress等建站问题咨询管理
• 加微信:344452500(不闲聊,直接说事)

写一条评论

Based on Golang + fastHTTP + sdb | go1.16.8 Processed in 1ms