r-lib / actions

GitHub Actions for the R community
Creative Commons Zero v1.0 Universal
930 stars 200 forks source link

Should we cache the system cache folder by default? #829

Closed hadley closed 2 months ago

hadley commented 2 months ago

Some context: I just noticed that tidyverse packages download a bunch of files whenever they're building the website. These turn out to be google font files downloaded by sass which for me locally are cached in ~/Library/Caches/org.R-project.R/R/sass. We could certainly cache this directory specifically, but I wondered if it might make sense to cache the root directory used by tools::R_user_dir(..., "cache").

gaborcsardi commented 2 months ago

All downloads together take less than a second to run, so I would say that we don't need to. :)

hadley commented 2 months ago

Yeah, in that case, not a big deal (especially since I'm working on better messaging in https://github.com/rstudio/sass/pull/141), but I did wonder if enabling cross-session caching for all packages might be nice/worthwhile. It might need an explicit opt-in or an opt-out.

gaborcsardi commented 2 months ago

I think there is also a risk, in that confidential information might be shared with pull requests, or if test cases assume an empty state, or a certain format of files in the cache.

So I think this is something that repos would best manage individually, according to their needs. If it turns out that there is such need.

hadley commented 2 months ago

Yeah, that makes sense too.

github-actions[bot] commented 1 month ago

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue