Does anyone know how to exclude just the homepage form the varnish cache. The docs seem to suggest all the paths below the exclusion rule will be excluded so if just / is used then I believe all pages will be excluded. Any help much appreciated
The Varnish URL exclusion rules allow for the use of Regex. So you would enter
/$ to exclude only the home page.
The $ symbol says “don’t match if the target string has any characters beyond where I have placed the dollar sign”.
Test to confirm, of course.
Thank you so much Paul
Sorry - should have mentioned - that rule is very specific for URLs with nothing after the root domain name. So it will not kick in if the URL includes things like variables such as UTM tracking codes or other variables introduced by a "?"
If your home page occasionally has those kinds of variables added, you’ll need a more specific regex rule to capture those use cases.