How should we setup the nginx-expires setting only for files that include a hash in the name?
e.g. the angular build process will output:
where:
ngs-worker.js(non-hashed filename) must not be cachedpolyfills-es5.3eb4a9891f4a514281f1.jsetc. (hashed file-name) can be cached forever
Now, I know I could setup max cache expiry for all js files and exclude some (e.g. ngs-worker.js)
But this would be disastrous when I forget a non-hashed file or if a future version will produce additional non-hashed files.
How should we handle this?
Maybe use a regex to find all hashed-files?

mapto set theexpiresvalue. See this answer.