1

When I call back a pinned object from github I noticed that it does not return the latest updated version and there is at least five minutes delay. Here is an example:

board_register_github(name = "GitHub-BFDD", repo = "AkthemRehab/BFDD", branch = "main")
Results <- data.frame(Results=numeric(), stringsAsFactors = F)
pin(Results, "Results", board = "GitHub-BFDD")

Now lets add one record to the Results data frame and update the pin:

Results[nrow(Results)+1,] <- as.numeric(10)
pin(Results, "Results", board = "GitHub-BFDD")

When I recall the updated Results data frame it take at least 5-10 minutes before reflecting the update. When I check the csv file in github it get updated instantaneously though. I use this command to get the updated pin to my R environment:

Results <- pin_get("Results", board = "GitHub-BFDD")

I am updating the Results data frame quiet often in my application and would like pins to reflect the updates in real-time.

Edit: Any updates or inputs to that question ?

Akthem
  • 53
  • 7
  • Your values are probably being cached so they aren't constantly being re-downloaded. Try `Results <- pin_get("Results", board = "GitHub-BFDD", cache=FALSE)`. See `?cache_info` for more info – MrFlick Jun 04 '21 at 23:02
  • 1
    This has nothing to do with Git. You're merely using some Git repository. You're also using your internet connection, but you didn't tag this with [tag:tcp-ip] for instance; please don't use the Git tag if you're not running Git commands. (I suspect the [tag:github] tag is inappropriate here as well, unless your question comes down to particular GitHub APIs.) – torek Jun 05 '21 at 03:35
  • @MrFlick I tried to add cache=FALSE but there is still a delay when I call the object with pin_get. – Akthem Jun 05 '21 at 09:47
  • @torek Noted. However, there is a small chance the delay has something to do with where the file is hosted (i.e. git and/or github), especially that, when I update a file and check it in github, I find the update reflected instantly in but the pin_get command doesnot return the latest file except after a delay of 5-10 minutes. – Akthem Jun 05 '21 at 09:53

0 Answers0