I have a static resource bundle (MIME Type: application/x-zip-compressed) which contains my .css and .js files.
I have noticed that when I upload a new version of the static resource it can take a long time before it can actually be downloaded (even with Incognito, clearing browser cache, disabling the cache with DevTools) from the community URL e.g.: /sfsites/c/resource/my-static-resource/css/my-stylesheet.css
Community will keep serving the old file for hours or even days before the new file finally appears. I observe this by comparing the output of the Community resource script/link URL to the actual file from the static resource bundle downloaded directly from the org.
This caching is causing problems for us because we cannot deploy script or styling fixes or new features with any predictability. In a hotfix scenario we would have to implement temporary measures while waiting for the actual hotfix (.css or .js fix) to finally propagate.
What is the reason for this server-side caching behavior? Is there any way I can force the Community to flush the server-side static resource cache?
NB: I have tried manually appending a query parameter to the link/script URL but it is ignored.
NB: The script / link tags are inserted in the Head Markup section of the Community site, so there is no support for URLFOR or similar.