Skip to content
Back to formatted view

Raw Message

Message-ID: <CADqzidXwkSTKcd63-=FC9xYHqPZtLshPnNX8m9ByOcEk7ez+xA@mail.gmail.com>
Date: 2017-12-09T22:18:08Z
From: Michael Love
Subject: [Bioc-devel] BiocFileCache for developers
In-Reply-To: <CAFDcVCQUbYyab52rvjV0-mnDGtpXF5t681JTSn=t=fqQUhO7tg@mail.gmail.com>

thanks Henrik,

I like the explicitness of the `R.cache` approach and I copied it for
my current implementation.

For the BiocFileCache location that should be used for this package
I'm developing, `tximeta`, I'm now using the following logic:

* If run non-interactively, `tximeta` uses a temporary directory.
* If run interactively, and a location has not been previously saved,
  the user is prompted if she wants to use (1) the default directory or
  a (2) temporary directory.
    - If (1), then use the default directory, and save this choice.
    - If (2), then use a temporary directory for the rest of this R
      session, and ask again next R session.
* The prompt above also mentions that a specific function can be used
  to manually set the directory at any time point, and this choice is
  saved.
* The default directory is given by `rappdirs::user_cache_dir("BiocFileCache")`.
* The choice itself of the BiocFileCache directory that `tximeta`
  should use is saved in a JSON file here
  `rappdirs::user_cache_dir("tximeta")`.