Justyna
Justyna

Reputation: 31

How to prevent shinyapps.io caching?

I've created a small app using R & Shiny (that works with dynamic data) and have deployed it using shinyapps.io server for non commercial use.

It seems shiny server caches the data - every time I restart the server application's UI shows up to date information, but the next day the old data appears (data I see after the restart).

I've been looking for some information regarding this problem and found out that using:

ui <- function(req){
 dashboardPage(
  ...
 )
} 

instead of:

ui <- dashboardPage(
 ...
)

should resolve the issue.

But unfortunately it doesn't work in my case and e.g. today I see the data from the moment I restarted the server.

Does anyone has an idea on how to resolve this problem?

Thanks!

Upvotes: 0

Views: 1006

Answers (1)

Justyna
Justyna

Reputation: 31

I've found the similar problem here (no idea how I missed it before)

It seems that moving all the data fetching to the

server <- function(){} 

resolved the problem.

Upvotes: 2

Related Questions