Remove shiny cache



Dear community,

I am now deploying a shiny app, but when i relaunch the app, the changes do not apper, and a cached version of the app is displayed.

How can I flush this cache? I have trying everything, like closing Firefox and open in private mode to the url:port, and also closing and reopening Rstudio.

Thanks in advance


How do you relaunch? The Shiny Server looks at the timestamp of the main file (app.R or server.R/ui.R) to determine i reload is needed. Just touch these files and Shiny Server will force a reload. Alternatively, restart the server (this is probably only useful in a development setup).



I agree with @stkrog. In my experience, restarting the server is the fastest way to have your app reflects your code change.


What files have you changed when you say you deployed a new app? A not very well known trick is to create a file named restart.txt in the same directory as your ui/server. Whenever this restart.txt file is modified, the app will restart. You can run the command touch restart.txt to do that.


... or just touch app.R :wink:


If you are deploying on Rconnect theres an option at the top of the screen that lets you change the active version of your app. It forces a restart when it changes versions (so you can flip back and forth)


(Really useful if your app pulls data from an external source when it starts and you don't want to re-deploy the application or wait hours to refresh the data.)