I'm building a lightning component using the new Lightning Web Component framework, the component retrieves information from a custom setting with three checkboxes, once the user changes the values of those fields, and hits Save, the record is updated. If I navigate to the Home tab, and then I come back to the custom tab that contains the component, it shows the previous value. It has to be something with the cache, any ideas?

NOTE: The getMyValues method returns something back to the component, only if I set (cacheable=true)


    <lightning-checkbox-group name="Checkbox Group"
    label="Checkbox Group"
    onchange={handleChange} class="slds-m-around_medium"> 
<lightning-button label="Save" title="Save" onclick={handleSaveClick} />


import { LightningElement, track, wire } from 'lwc';

import getMyValues from '@salesforce/apex/MyController.getMyValues';
import setMyValues from '@salesforce/apex/MyController.setMyValues';

    export default class CheckboxGroupBasic extends LightningElement {

        @track value = [];

        @wire (getMyValues)
        wiredMyValues({error, data}){
            let deserializedData;
            if (data){
                deserializedData = JSON.parse(data);
                if (deserializedData.Value1)
                if (deserializedData.Value2)

        handleSaveClick() {
            // DML action here... // WORKS FINE

apex controller

public static String getMyValues(){
    ConfigOptions__c config =  ConfigOptions__c.getValues('My Config');
    return JSON.serialize(config);
  • you will need to share a minimal reproduceable code sample for better assistance
    – glls
    Apr 3 '19 at 15:07
  • As glls mentioned it is hard to say for sure with the limited information, but this may help you.
    – Aayush K
    Apr 3 '19 at 15:13

Your Answer

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

Browse other questions tagged or ask your own question.