Our current website setup is that we cache all pages by default and then use the page rules to bypass cache.
With the migration to Cache Rules we need to replicate something similar.
When reading further into Cache Rules, it appears that the support for wildcards has been dropped.
As an example, if we want to currently bypass cache using page rules for any url that matches the pattern /fee/*/fii/*/ then we can, however, in Cache Rules we are not able to utilize the asterisk on a URI, nor are we able to to use regex matching.
We can create a Cache Rule thatâll do something similar, i.e "begins with /fee/ and âcontainer /fiiâ but it starts to get a bit complicated when this may match other routes.
Is it possible to use wildcards within Cache Rules? Am I doing something wrong?
Wildcard support for Cache Rules and for Ruleset Engine in general is coming this year.
If you canât use matches operator and if a combination of functions like starts_with, ends_with, substring and concat doesnât lead to desired results, I would suggest to wait until we release wildcard support.
I do not see the âwildcardâ option under the expression builder under cache rules. Our current version of the rules use wildcards in page rules, and they have been tested and in production for several years. I do not want to risk errors by having to re-write them as regex or change the logic by using multiple steps.