Old Page Rule to new Caching rule

We have some older page rules setup on a few zones that do a "cache everything" for certain paths. I am having issues getting this same functionality using a new cache rule. Anyone have any insight on how to do a "cache everything" with the new rules?
1 Reply
SuperHelpflare
Support AI
According to the documentation, when you create a new Cache Rule and select Eligible for cache, the Cache Everything feature is enabled by default. However, this is different from the behavior of Page Rules, where you had to specifically enable the Cache Everything option. To maintain the same behavior you had with Page Rules (i.e., not enabling Cache Everything), you need to create two specific rules in a particular order before creating any additional rules. For a "cache everything" rule, you can try the following: 1. Create a new Cache Rule with the Eligible for cache option selected. 2. In the Edge TTL section, select Ignore cache-control header and use this TTL. 3. Set the TTL to a suitable value (e.g., 1 hour, 1 day, etc.). This should enable caching for the specified path, ignoring any cache-control headers from the origin server. Additionally, you can also include the Edge Cache TTL setting within the Cache Rule to override the Cache-Control headers from the origin web server, as mentioned in the documentation: https://developers.cloudflare.com/cache/concepts/customize-cache/ Please note that you should test your Cache Rule to ensure it's working as expected.
Feedback
Feedback has been submitted! Thank you :)
This is an AI generated response, it may not be 100% accurate. Please validate the output. You can ask followups by replying to this message or mentioning me.

Did you find this page helpful?