29

When developing a lightning components in the lightning experience, let's say I make a change to custom_componentController.js. If I want to see these changes in the lightning UI, I have to hard refresh chrome twice in order for my changes to be rendered. Is there a way to break this cache?

I found this known issue which is exactly what I am experiencing but it says it was fixed in all instances.

Has anyone else experienced this as of late or does anyone have a solution?

  • Can confirm that this behavior is not present in Safari. – BrBarr Aug 2 '16 at 15:42
  • 3
    I can confirm that this is a pain in the butt for me too. These days I typically just hammer F5 about 8 times and add random characters to my cmp to see if I am actually getting a refreshed version of it in LEX. Good luck to yourself with this battle :) – Simon Lawrence Aug 4 '16 at 10:14
  • I can also confirm this issue in Chrome (Version 50.0.2661.102 (64-bit) ). – SE_User Aug 5 '16 at 9:50
  • Experiencing the same problem here in Chrome 52.0.2743.116. I always need to refresh twice to see my component updates. – Rob Sep 8 '16 at 11:48
  • Yup this is an awful developer Experience... seems to be getting worse. Think I had read that caching was being increased to add speed to the user experience. – dacology Mar 16 '17 at 9:31
27

By looking at this article on Lightning Components Performance Best Practices, it looks like the only way to solve the cache problem is to disable the cache during development and keep it on in Production.

To disable the cache in the org:

1) Setup > Security > Session Settings > Caching.

2) Uncheck Enable secure and persistent browser caching to improve performance

NOTE : Client side caching is an org-wide setting. Disabling the setting might cause an significant impact on performance.

  • 2
    This should be the accepted solution. This is a documented approach that does not require any complicated URL hack. – abd3721 May 23 '17 at 3:48
0

I do not have a solution, but it does happen to me from times to times.

I use a chrome extension to easily clear my cache with one click:

Clear Cache

  • 1
    I'm currently using this, but still there's a need to refresh twice (even using this extension) to see the changes. – SE_User Aug 5 '16 at 9:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.