Create DX scratch org with caching disabled

One of the most useful tips I’ve come across when developing lightning components in Salesforce is to disable caching, as otherwise Salesforce tends to aggressively cache components which makes development a nightmare.

However, now I’m using DX I’m having to do this manually in every scratch org I create, which is a real pain. Is there an option to do this automatically, either via a DX command org via the scratch org JSON definition file?


Yes, you can disable caching in scratch org by specifying S1EncryptedStoragePref2 as disabled org preferences in your scratch org definition file.

    "orgName": "DevOrg",
    "edition": "Developer",
    "orgPreferences" : {
        "enabled": ["S1DesktopEnabled"],
        "disabled": ["S1EncryptedStoragePref2"]

Thanks René Winkelmeye for this hint:

Source : Link , Question Author : berry120 , Answer Author : steals

Leave a Comment