Help Center/ Content Delivery Network/ FAQs/ Cache Settings/ Why Is the CDN Cache Hit Ratio Low?
Updated on 2024-04-17 GMT+08:00

Why Is the CDN Cache Hit Ratio Low?

Possible causes:

  • The HTTP header has been incorrectly configured. As a result, the content cannot be cached. Check the Cache-Control settings of your origin server. If cache-control is set to no-cache, no-store, max-age=0, or private on the origin server and Origin Cache Control is enabled on CDN, CDN cannot cache resources, resulting in a low hit ratio.
  • The maximum cache age you have configured is too short. In this case, CDN points of presence (PoPs) will not be able to cache data. They will frequently pull the fresh content from the origin server. As a result, the CDN cache hit ratio will be low.
  • A large portion of the content on your origin server is dynamic. CDN mainly accelerates static content (such as CSS, JS, HTML, TXT files, pictures, and video). Dynamic content (such as ASP, JSP, PHP files, APIs, and dynamic interaction requests) is typically pulled from the origin server.
  • If your origin server has a large number of resources and does not support range requests, CDN PoPs will pull complete resources, increasing the pull traffic and affecting the traffic hit ratio.
  • The website is not accessed very frequently. Content cached on the CDN PoPs may be deleted due to infrequent access. As a result, the fresh content is pulled when it is accessed, and the CDN cache hit ratio will decrease.
  • An exception occurred on your origin server. In this case, troubleshoot your origin server first.
  • HEAD requests are sent. By default, CDN does not cache HEAD requests. Even if cache prefetch is performed, HEAD requests are not cached.