bookCache: Get the local book cache

View source: R/bookCache.R

bookCacheR Documentation

Get the local book cache

Description

Get the path to the cache directory in which the book will be built.

Usage

bookCache(package)

bookCacheExpiry()

Arguments

package

String containing the name of the book package.

Details

For bookCache, the last elements of the output path are the package and version, consistent with the expectations of dir.expiry functions. This path is located in a directory determined by rappdirs. If the environment variable REBOOK_CACHE is set, it is used to obtain the root of the path instead.

If the environment variable REBOOK_CACHE_EXPIRY is set, it is coerced into an integer and returned by bookCacheExpiry. This allows users to tune the expiry interval for older cached books.

Value

For bookCache, a string containing the path to the cache directory for this book package.

For bookCacheExpiry, an integer specifying the maximum number of days from last access for a book cache. Any unaccessed caches are subject to deletion by various rebook functions.

Author(s)

Aaron Lun

See Also

configureBook, where this function is used in the Makefile.

extractFromPackage, which populates the cache directory if this is not supplied.

Examples

bookCache('OSCA.workflows')
bookCacheExpiry()


LTLA/rebook documentation built on June 5, 2023, 6:24 p.m.