I am building a dashboard (using shinydashboard) that interfaces with the UNHCR data API but it is proving to be a bit too demanding in terms of computation. So I was wondering, is there a way to cache some of the demanding components and add a refresh option?
For instance, can I cache "JOR" and "population" below, and refresh them when needed? If yes, how?
JOR <- fromJSON("http://data.unhcr.org/api/population/search.json?name=JOR&level=country&instance_id=syria")
population <- JOR$population