I have shiny app, which is displaying old data (4 days delay!) though on the server data are refreshed (current day).
What is strange the old dataset does not exist
I found that cache of R Shiny server is updated when the date of creation for the file "app.R" is changed.
So, here is the trick I used:
server <- function(input, output, session) {
# Trick file date creation update
onStop(function() {
# File name
p <- paste0(getwd(), "/app.R")
# Update file 'date creation'
Sys.setFileTime(p, now())
}) # onStop
...
} # server
The idea is to update the date of "app.R" creation after each session.