Help Center/ Content Delivery Network/ FAQs/ Cache Settings/ Why Does a Cache Rule Not Take Effect?
Updated on 2024-08-15 GMT+08:00

Why Does a Cache Rule Not Take Effect?

Possible causes and solutions:

  1. You have just completed configuring the cache rule and it takes about 5 minutes for the rule to take effect. Verify cache configuration after the rule takes effect.
  2. You have modified the cache rule.
    • Your modifications are effective for new content cached.
    • You can purge to apply modifications to the existing cache.
  3. Cache rules have priorities. The cache rule with a higher priority (large value) is matched first. Check the priority of your cache rules.

    Example: You have configured a File type cache rule for domain name www.example.com to cache JPG files for only one day. The priority of the cache rule is set to 2.

    Result: When a user accesses the www.example.com/test/cdn.jpg file, two cache rules, Full path and File type, can be applied to this file. The priority of the Full path rule is 8, which is higher than that of the File type rule. Therefore, the system follows the Full path rule /test/*.jpg and caches the file for three days.

    Method: To make the File type rule to take effect, set its priority to a value greater than 8.