First checks if an environment variable Require.cachePkgDir
is set and defines a path.
If not set, checks whether the options("Require.cachePkgDir")
is set.
If a character string, then it returns that.
If TRUE
, then use cachePkgDir()
. If FALSE
then returns NULL
.