You need to sign in to do that
Don't have an account?

New functionality not reflecting immediately after changing logic in lightning component.
If something goes wrong in lightning component and I go back to component bundle and mofidy the logic there and save and comeback to browser and refresh the page and execute the component , But the component is sometimes displaying the same old logic. Is it because the Javascript handler code is being cached in browser or any other reason. I am able to look at the new logic in browser after making three or four refreshes.
This workaround/ setting fixed the Issue.
1. Go to Setup.
2. Under "Administration Setup", go to Security Controls -> Session Settings.
3. Disable the "Enable secure and persistent browser caching to improve performance" option under Caching section and click on Save.
Thanks,
Nihar.
All Answers
This is most likely due to the fact that Lightning components use the Aura framework server. The Aura server polls for changes at regular intervals to see if changes have been made to any components, and reloads them. If you download and run the open source Aura framework, and monitor the Jetty logs, you will see that after saving a component, it can take up to 10-15 seconds for it to see the change and load it.
I originally assumed, like you, that when a component request was made, that Aura would check to see if a change had been made, and if so, load that change. That is not the case. I also assumed that browser caching was an issue - that also turned out to be incorrect. The only answer is to be patient and let Aura detect the change. I often will make a visual tweak/change/increment a version # when working on logic, so I am sure that when I refresh, I am testing the latest version.
Greg Thomson
Thanks for your response. Seems like the issue still exists.
I have run the component with an alert statement, then modified the alert statement and waited for like one minute an dwen t back to ui and invoked the component and it still gives me the same alert.Once again if i execute the component after giving the same alert, I get the new alert message that I modified.
Nihar.
This workaround/ setting fixed the Issue.
1. Go to Setup.
2. Under "Administration Setup", go to Security Controls -> Session Settings.
3. Disable the "Enable secure and persistent browser caching to improve performance" option under Caching section and click on Save.
Thanks,
Nihar.
It's difficult to have its development progress in those conditions. I guess I only have to wait.
1) Press f12 in chrome
2) Right-click on the reload button
3) Select 'Empty Cache and Hard Reload'
4) Press f12 to close developer tools
I tried Nihar A's suggestion and this solved the issue.
It is working for me, now i am gertting my changes reflected immediately after deployment.