Salesforce help the runtime performance by caching components in the client. This is positive for the end users because page loads are fast. But is not very good for developers when developing Lightning Components, because they may think the code is wrong, or they have to hit hard refresh a few times while the cache is cleared.
We can fix this problem via configuration:
- Session Caching
Go to Setup > Session Settings > Caching
and deselect Enable secure and persistent browser caching to improve performance
Pay attention that this is an Org-Wide Setting.
Do not do this in Prod because caching improves performance and you shouldn’t need to test in Prod!
Another useful setting is:
- Debug Mode
Go to Setup > Develop > Lightning Components > Debug Mode
then check the box next to your user and click Enable.
Salesforce is slower for users who have debug mode enabled.