I'm a programmer so not sure if I'm dreaming if I think I can do this kind of logic in what should be a configuration file. Simply what I need, is an nginx response such that requests which include a /cacheXXX should strip out that part of the url.
So:
/cache123/editor/editor.js -> /editor/editor.js
/cache456/admin/editor.css -> /admin/editor.css
/cache987/editor/editor.js -> /editor/editor.js
And so anything else should be ignored i.e:
/hello/editor/editor.js -> /hello/editor/editor.js
The key point here is that if the url matches:
/cacheXXX
Then to strip that part out and return the rest.
What would an nginx location entry look like to achieve this look like?
For context as to the point of this, I am trying to break the browser cache by supplying new urls for updated resources by changing the path to the resource, rather then changing url parameters which isn't guaranteed.