is it true that cache rule work bottom to top?
is it true that cache rule work bottom to top?
Cache Rules are stackable. This means that multiple matching rules can be combined and applied to the same request. For example, if multiple cache rules match the same URL, then the features set in those cache rules will all be applied in order. If several matching rules set a value for the same setting, the value in the last matching rule wins. For an example of a similar scenario where multiple rules match, refer to the Origin Rules FAQ.
For conflicting settings (for example, bypass cache versus eligible for cache), the last matching rule wins. For example, if cache rule #1 is set to cache everything on example.com/images and cache rule #2 is set to bypass cache on example.com, then cache will be bypassed for all URLs that match example.com, since rule #2 is the last matching rule.

example.com then the cache rule will be applied.www.example.com then you will be redirected to example.com, after which all the rules will run again and so the cache rule will be applied also.example.com (it's correct right now), not www.example.com, because having it on www.example.com will simply cache the redirect and not the page.