[Solved] How can i invalidate the cache of webresource in Plone 6?

My JS Bundle have this URL in the prod-system:
/++webresource++3e047405-ca8d-5dd9-8c58-67e08081c249/++plone++my-addon/js/my.addon.bundle.js

Which action is needed to generate a new url after update and rebuild locally the bundle?

  • running buildout
  • click clear cache via theming controlpanel
  • click update via theming controlpanel

or reinstall the theming Package? But this should be always the last Option.

The value after ++webresource++ is the hash of the file. If the file changes, the hash changes and a new file is delivered, so no reason to invalidate the old one.

If started in foreground, or with development mode on, or with the development setting in resources registry controlpanel on, the hash is recalculated on every request (attention, this slows down the site, do not use in production).

Attention, only the named main file is hashed, if there are sub resources and the main file stays the same, this wont be noticed. In case of the new JS module federation (with lots of sub-files to load) the main file should change too after a webpack run (according to @thet) so this wont be a problem.

@jensens thanks for the hint.