In the case of composite WebRootFileProvider, we use one of the child providers.
Making new PhysicalProvide on each call breaks the cache busting, the file watch events (cancelation tokens) will get lost when the temporary provider gets cleaned/deleted.
Note, the issue for me was that the version hash key of my static files was not changing when the files themselves change.
My setup is:
Linux Ubuntu 22.04
.net core 6
latest WebOptimizer from GitHub as of May 28th, 2022.
In the case of composite WebRootFileProvider, we use one of the child providers. Making new PhysicalProvide on each call breaks the cache busting, the file watch events (cancelation tokens) will get lost when the temporary provider gets cleaned/deleted.
Note, the issue for me was that the version hash key of my static files was not changing when the files themselves change.
My setup is: Linux Ubuntu 22.04 .net core 6 latest WebOptimizer from GitHub as of May 28th, 2022.