We have a community composed of multiple LWC.

We are planning to release a big update in our production environment. When testing in other environments, some testers who had used the community previously could still see the old version of the community (or at least of some LWC) until they refreshed their cache. This situation is fine for developers and testers but we would like end users to have access to the latest version of our community as soon as it is available without having to ask them to refresh cache as they might not be proficient with computers.

Because some of our apex classes have changed the parameters they receive, having access to the old version of our LWC effectively means that the site is broken as the call to the backend always returns an error.

Would deactivating and reactivating our community after the release fix this kind of problem ?

Thank you for the help !

  • 1
    I typically would suggest looking into disabling enable secure and persistent browser caching under Session Settings but I've seen comments (particularly in this question) that production still may do some caching. Not sure if you've attempted that. May 10, 2021 at 16:49
  • @KrisGoncalves we also thought about it, but as this issue is breaking production I was wondering about a solution for which we are 100% sure of it working. Also I was wondering how long we would have to keep this setting to false before everyone's cache is cleaned and we can enable it again. May 11, 2021 at 7:24

2 Answers 2


I republished my site and that refreshed all the markup and it started to work as expected.


  1. Digital Experiences > All Sites > Select "Builder" on the affected community site.
  2. Hit "Publish" button

I struggled with this as well, and temporarily turning off the "Enable secure and persistent browser caching to improve performance" setting did not help.

What I did in the end: rename my LWC component ABC to ABCVyyyymmdd (so a date specific name). Of course, I had to change the references to my LWC as well, but in my case that was not a lot of work.

For Salesforce, this is an entirely new component, so not taken from any server or browser cache. It solved my problem.

  • This can add a lot of maintenance overhead. Oct 12, 2023 at 12:33
  • 1
    @NishantSinghPanwar Yes, it does, but it always works and it saves a lot of time and frustration. Oct 12, 2023 at 13:27

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .