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

💘 相关文章

写一条评论