Specific URL invalidation uses pre-rule URLs. For a SPA, this is the entire space of the customer accounts and unique IDs.
What steps have you taken to resolve the issue?
Read lots of docs.
What are the steps to reproduce the issue?
Attempt to invalidate just the changed files instead of all of the static files. For example, given demo.pencilitout.com/index.html, demo.pencilitout.com/assets/23fageh.js, demo.pencilitout.com/assets/23fageh.css, and demo.pencilitout.com/static/very_large_file.pdf, I’d like to invalidate the first three but not the very_large_file.pdf.
However, SPA URLs look something like this: demo.pencilitout.com/analysis/AAAAAA/deal/BBBBBB where the AAAAAA and BBBBBB are very different for every customer.
All of these URLs are mapped via rule to demo.pencilitout.com/index.html in R2.
Because the “exact url invalidate” requires the pre-rule URL and not the post-URL rule, this appears to make it impossible to invalidate just the assets that haven’t changed.
I could, theoretically, use prefix just fine because my static assets are under a sub-url. As it is, I have to do a full cache invalidation or no invalidation at all, which sucks.
If you have a Transform Rule in place that is modifying part of a URL path, you must use the non-transform (end user) URL when performing single file purge so that purge can take effect.
That looks like a special case for Transform rules and Purge URL. That is not how a Purge Prefix works, as I just tested it. For Purge URL, both look to be interchangeable.