All Products
Search
Document Center

:The passing parameter of the URL is a variable, resulting in a low Alibaba Cloud Content Delivery Network cache hit rate

Last Updated:Jan 12, 2022

Problem description

When using Alibaba Cloud Content Delivery Network, the Alibaba Cloud Content Delivery Network has a low cache hit rate. In the browser, press the F12 key, in the access page, click the Network, and then in the Name option, click the Headers, in the Response Headers module, confirm that the URL response header information is X-Cache as MISS, then no Alibaba Cloud Content Delivery Network cache is hit. However, in the page, the X-Cache of the URL response header information of the corresponding file is HIT.

Note: This case takes Chrome browser as an example.

Causes

The Alibaba Cloud Content Delivery Network filtering parameter function is not turned on.

Solutions

The following is a description of the Alibaba Cloud Content Delivery Network cache hit rate and related solutions to the low Alibaba Cloud Content Delivery Network hit rate.

Description of Alibaba Cloud Content Delivery Network hit rate

  • Alibaba Cloud Content Delivery Network hit indicates that the required data can be obtained directly through cache.
  • Alibaba Cloud Content Delivery Network no hit indicates that the required data cannot be obtained directly through the cache, and you need to query the database again or perform other operations. In general, it may be because the required data does not exist in the cache at all, or the cache has expired.

Enable the filter parameter function

  1. The parameters passed in the URL may be variables because the Alibaba Cloud Content Delivery Network filtering parameter function is not turned on. Take the following URL as an example, the corresponding file is ArrowScene.ccbi, but every time the file is opened, the URL "?The number after the_t="field is a variable, so the Alibaba Cloud Content Delivery Network will not cache the data.
    http://example.com/movie/XSHD/res/ccb/ArrowScene.ccbi?_t=xxxxxxxxxxxxxx
  2. Log on to the Alibaba Cloud Content Delivery Network console and turn on the filtering parameter function. For more information about how to enable parameter filtering, see Filter parameters.
    Note: After turning on this function, "?Parameters after the_t="field are ignored.

Application scope

  • CDN