function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Swiderski, ErikSwiderski, Erik 

Caching issues when developing a lightning component

Has anybody run into weird caching issues lately when developing a lightning component?

I started by making sure I was getting the record id correctly and pulling in fields from that record, starting with Name field. Got that to display in the component. Then changed to show a date field on that record instead of the name, that worked.

Now down to the nitty gritty. Added a couple <lightning:radiogroup> and started changing some of the attributes to see if I could get the second one to work as a multi select. Now, instead of showing any of the radio groups, the component shows 5 or 6 "saves" ago when when I had only the name field showing on the component. Refresh the page the component is on, now it shows the date field that I used 5 saves ago.

Keep refreshing and eventually the component updates and goes through the different saves I've done...even though I don't have that code showing in the component any longer. I've cleared cache in chrome but still really confused as to where this is coming from.
Swiderski, ErikSwiderski, Erik
<aura:attribute name="options1" type="List" default="[
    {'label': 'Over the phone', 'value': 'phone'},
    {'label': 'Tablet in the office', 'value': 'tablet'}
    ]"/>
    <aura:attribute name="value1" type="String" default=""/>

    <lightning:radioGroup name="radioButtonGroupRequired"
                          label="DocuSign Type"
                          options="{! v.options1 }"
                          value="{! v.value1 }"
                          type="button"
                          required="true"/>
    
    <aura:attribute name="options2" type="List" default="[
    {'label': 'Insured', 'value': 'Insured'},
    {'label': 'Me', 'value': 'Me'},
    {'label': 'Someone else', 'value': 'Someone else'}                                                    
    ]"/>
    <aura:attribute name="value2" type="String" default=""/>

    <lightning:radioGroup name="radioButtonGroupRequired33"
                          label="Signers"
                          options="{! v.options2 }"
                          value="{! v.value2 }"
                          type="button"
                          required="true"/>

User-added image

As you can see, what is rendered is not at all what I have for code... what is going wrong why this is happening?
Raj VakatiRaj Vakati
This issue is because of the session setting "Enable secure and persistent browser caching to improve performance"

Go to salesforce session setting and and uncheck that checkbox and try 

User-added image
Swiderski, ErikSwiderski, Erik
That is already unchecked. I'll post another example I ran into today. I'm creating a form to input some basic info for when an employee is hired. I started with using the lightning:inputname and lightning:inputaddress components but ultimately decided they weren't the best route to go for what I needed. I continued working for over an hour, adding fields and perfecting the layout. Now, suddenly I refresh the page and load the modal and the inputname and inputaddress components are showing even though they are nowhere to be found in my code any longer. Why does this happen?
 
<aura:component implements="force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId" controller="CSRMgmtController" access="global" >
    
    <aura:attribute name="CSRs" type="Object" />
    <aura:attribute name="searchText" type="String" default=""/>
    <aura:attribute name="thisCSR" type="Object" />
    
    <aura:attribute name="fname" type="String"/>
    <aura:attribute name="lname" type="String"/>
    
    <aura:attribute name="addrstreet" type="String"/>
    <aura:attribute name="addrcity" type="String"/>
    <aura:attribute name="addrstate" type="String"/>
    <aura:attribute name="addrzip" type="Integer"/>
    
    <aura:attribute name="mobilenum" type="String"/>
    <aura:attribute name="homenum" type="String"/>
    
    <lightning:card title="CSR Management">
        <aura:set attribute="actions">
            <lightning:button label="New" onclick="{!c.doOpenModal}"/>
        </aura:set>
        
        
        <lightning:layout class="slds-grid_align-space" >
            <lightning:layoutItem padding="around-small" size="6">
                <div onkeyup="{! c.handleKeyUp }">
                    <lightning:input
                                     aura:id="search-box"
                                     name="search-box"
                                     label="Search for CSR"
                                     type="search" />
                </div>
                
            </lightning:layoutItem>
        </lightning:layout>
        
        
        
        
        
        
        <!-- <lightning:layout multipleRows="true" > -->
        <!-- <lightning:layoutItem padding="around-small" size="6"> -->
        <div class="slds-card-wrapper">
            <div class="slds-grid slds-wrap slds-align_absolute-center">
                <div class="slds-col slds-size_1-of-2">
                    <span>
                        <aura:iteration items="{!v.CSRs}" var="c">
                            <!-- href="{! '/' + c.Id}" -->
                            <lightning:card iconName="standard:groups">
                                <aura:set attribute="title">
                                    <a href="{! '/' + c.Id}">{!c.Name}</a>
                                </aura:set>
                                <aura:set attribute="actions">
                                    <lightning:button variant="bare">
                                        <lightning:buttonIcon iconName="utility:chevrondown"/>
                                    </lightning:button> 
                                </aura:set>
                                
                                <dl class="slds-dl_horizontal">
                                    <dt class="slds-dl_horizontal__label">
                                        <p class="slds-truncate">Title:</p>
                                    </dt>
                                    <dd class="slds-dl_horizontal__detail slds-tile__meta">
                                        <p class="slds-truncate">{!c.CanaryAMS__Title__c}</p>
                                    </dd>
                                    
                                    
                                    <dt class="slds-dl_horizontal__label">                            
                                        <p class="slds-truncate">Name:</p>
                                    </dt>
                                    <dd class="slds-dl_horizontal__detail slds-tile__meta">
                                        <p class="slds-truncate">{!c.Name}</p>
                                    </dd>
                                    
                                    
                                    
                                    <dt class="slds-dl_horizontal__label">     
                                        <p class="slds-truncate">Status:</p>
                                    </dt>
                                    <dd class="slds-dl_horizontal__detail slds-tile__meta">
                                        <p class="slds-truncate">{!c.Producer_Status__c}</p>
                                    </dd>
                                    
                                    
                                </dl> 
                                
                            </lightning:card>
                            
                            
                        </aura:iteration>
                    </span>
                </div>
            </div>
            
        </div>    
    </lightning:card>
    
    
    <div role="dialog" tabindex="-1" aria-labelledby="header43" aura:id="Modalbox" class="slds-modal">
        <div class="slds-modal__container">
            <div class="slds-modal__header">
                <lightning:button class="slds-button slds-modal__close slds-button--icon-inverse" variant="base" title="Close" onclick="{!c.doCloseModal}">
                    <lightning:icon iconName="utility:close" size="small" />
                </lightning:button>
                <h2 id="header43" class="slds-text-heading--medium">New Employee</h2>
            </div>
            <div class="slds-modal__content slds-p-around--medium">
                
                <lightning:layout horizontalAlign="center">
                    <lightning:layoutItem size="5">
                    <lightning:input name="fname" label="First Name" value="{!v.fname}"/>
                    </lightning:layoutItem>
                    
                    <lightning:layoutItem size="5">
                        <lightning:input name="lname" label="Last Name" value="{!v.lname}"/>
                    </lightning:layoutItem>
                </lightning:layout>
                
                <lightning:layout horizontalAlign="center">
                    <lightning:layoutItem size="10">
                        <lightning:input name="addrstreet" label="Street Address" value="{!v.addrstreet}"/>
                    </lightning:layoutItem>
                </lightning:layout>
                
                <lightning:layout horizontalAlign="center">
                    <lightning:layoutItem size="4">
                        <lightning:input name="addrcity" label="City" value="{!v.addrcity}"/>
                    </lightning:layoutItem>
                    
                    <lightning:layoutItem size="2">
                        <lightning:input name="addrstate" label="State" value="{!v.addrstate}"/>
                    </lightning:layoutItem>
                    
                    <lightning:layoutItem size="4">
                        <lightning:input name="addrzip" label="Zip" value="{!v.addrzip}"/>
                    </lightning:layoutItem>
                    
                </lightning:layout>
                
                <lightning:layout horizontalAlign="center">
                    <lightning:layoutItem size="5">
                        <lightning:input type="tel" label="Cell" name="mobile" value="{!v.mobilenum}" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}"/>
                    </lightning:layoutItem>
                    
                    <lightning:layoutItem size="5">
                        <lightning:input type="tel" label="Cell" name="mobile" value="{!v.homenum}" pattern="[0-9]{3}-[0-9]{3}-[0-9]{4}"/>
                    </lightning:layoutItem>
                    
                </lightning:layout>
                
            </div>
            <div class="slds-modal__footer">
                <lightning:button variant="neutral" label="Cancel" title="Cancel" onclick="{! c.doCloseModal }"/>                
                <lightning:button variant="brand" label="Save" title="Save" onclick="{! c.doNewCSR }"/>
                
            </div>
            
        </div>
    </div>
    <div class="slds-backdrop " aura:id="Modalbackdrop"></div>
    
    
</aura:component>

​​​​​​User-added image
X22X22
Did this issue ever get resolved or a workaround discovered? 

An issue I am trying to resolve is with label caching in a modal window... despite "Enable secure and persistent browser caching to improve performance" being disabled. 

Ctrl+F5 forces labels within standard lightning windows to update, but not in Modal windows... 

It's as if they are beyond the relms of a hard refresh! 

Any assistance would be great...