title: Shiny cache causes delay in rendering with renderUI
body: <p>I have a Shiny app below, in which I am drawing a scatter plot on <code>iris</code> dataset using libraries <code>highchart</code>, <code>ggplot</code> and <code>plotly</code>.</p>
  <pre><code>library(shiny)
  library(shinydashboard)
  library(highcharter)
  library(shinyWidgets)
  library(plotly)
  library(ggplot2)
  library(data.table)
  
  siderbar &lt;- dashboardSidebar(
    sidebarMenu(
      # Add buttons to choose the way you want to select your data
      selectizeInput(inputId = &quot;inp_species&quot;, label = &quot;Select by:&quot;, choices = c(&quot;setosa&quot;, &quot;versicolor&quot;, &quot;virginica&quot;), selected = &quot;setosa&quot;),
      awesomeRadio(inputId = &quot;radioTest&quot;, label = &quot;Choose one:&quot;,
                   choices=c(&quot;High Charter&quot; = &quot;highcharter&quot;,
                             &quot;Simple Plot&quot; = &quot;simple&quot;,
                             &quot;Plotly&quot; = &quot;plotly&quot;),
                   inline = FALSE, selected = &quot;highcharter&quot;)
    )   
  )
  
  body &lt;- dashboardBody(
    fluidRow(
      tabBox(
        side = &quot;right&quot;,
        selected = &quot;Tab1&quot;,
        tabPanel(&quot;Tab1&quot;, &quot;Tab content 1&quot;, uiOutput(&quot;tabset1Selected&quot;))
      )
    ),
  )
  
  shinyApp(
    ui = dashboardPage(
      dashboardHeader(title = &quot;tabBoxes&quot;),
      siderbar,
      body
    ),
    
    server = function(input, output, session) {
      
    iris_dt &lt;- reactive({
      iris_table = data.table(copy(iris))
      iris_table[Species == input$inp_species]
      })
    
     render_content &lt;-  reactive({
       req(input$radioTest)
       print(input$radioTest)
        if(input$radioTest=='highcharter'){
        output$plot1 &lt;-   renderHighchart({
          highchart() %&gt;%
            hc_add_series(iris_dt(), type = &quot;scatter&quot;, hcaes(x = Petal.Width, y = Sepal.Length))
          })
        out &lt;- highchartOutput(&quot;plot1&quot;)
        }
  
        
        else if(input$radioTest=='plotly'){
          output$plot2 &lt;- renderPlotly({
            plot_ly(iris_dt(), x = ~ Petal.Width, y = ~ Sepal.Length)
          })
          out &lt;- plotlyOutput(&quot;plot2&quot;)
        }
       
       
       else if(input$radioTest=='simple'){
         output$plot3 &lt;- renderPlot({
           ggplot(iris_dt(), aes(x =  Petal.Width, y = Sepal.Length)) + geom_point()
         })
         out &lt;- plotOutput(&quot;plot3&quot;)
        
       }
       
       return(out)
      })
      
      
      # The currently selected tab from the first box
      output$tabset1Selected &lt;-  renderUI({
        render_content()
      })
      
  
      
    }
  )
  </code></pre>
  <p>I am selecting the library to draw the chart dynamically using a selectInput box.</p>
  <p>Here is the problem -</p>
  <ol>
  <li>I select a species in <code>selectInput</code> box and the <code>highchart</code> library draws a scatter plot</li>
  <li>Then I select <code>plotly</code> in the radio button section and the rendering is done using plotly.</li>
  <li>I change the species in <code>selectInput</code> and <code>plotly</code> re-renders the plot</li>
  <li>Now, when I click on <code>highchart</code> radio button, the plot of the earlier species (from cache) is drawn for a few seconds and then the chart of the selected species is drawn.</li>
  </ol>
  <p><strong>Question</strong>
  Is there a way to clear or disable the cache so that the rendering delay does not happen?</p>