if ( req.url ~ "^.*/my_path_segment/.*$" ) {
set beresp.http.surrogate-key = if (beresp.http.surrogate-key, beresp.http.surrogate-key + " " + "my_surrogate_key", "my_surrogate_key");
}
An advantage of priority 99 instead of 100 is so it will be evaluated before 100 which may include return (deliver); statements that short-circuit evaluation.
An issue I encountered when researching this topic was the curl command was missing on many doc pages when searching for “Fastly Purge”, “Purge based on URL”, and “Surrogate Key”. I eventually found it in a page about “Soft Purges”.
However, when someone is investigating “fastly purge”, the concept of “soft” is not at the top of your mind. The admins might consider propagating the curl commands to a few more of the existing documentation pages even those which aren’t focused specifically on “soft purge”.
That’s good feedback on the prominence of Soft Purge in the docs. Are there specific ones you checked early on / are there specific docs where you’d expect to see different content?
The information can eventually be found. It’s not entirely missing.
Let’s say the goal is to find the curl command in conjunction with a surrogate key. That’s necessary to purge based on a wildcard URL path. If it shows “curl -X PURGE”, that’s not quite it yet.
While being maximally elegant and beautiful, the page may be outsmarting casual users, such as myself.
I wonder if there could be a compromise between displaying all data in that page, and having everything hidden inside drop-down sections that don’t allow Ctrl-F find-on-page. At least worth thinking about.