How update data cache for Shiny server?

I have R Shiny application with UI setting parameters.

It works fine locally and via web R Studio. But when loading on the web - data cache is not updated immediately.

For example, if I write UI settings in the file the changes reflect in the data table. But Shiny loaded "old" data.

Does anyone know how to have "fresh" data for R Shiny app web sessions?


Could you make a minimal REPRoducible EXample (reprex) about your issue?
Here is a very useful guide about how to make a reprex for a shiny app

Here is a trick I found from comments on forums - keep date of "app.R" creation file fresh

server <- function(input, output, session) {
  # 1. Trick file date creation update
  onStop(function() {
    # 1. File name
    p <- paste0(getwd(), "/app.R")
    # 2. Update file 'date creation'
    Sys.setFileTime(p, now())
  }) # onStop


This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.