
Where generated coefficient tables are kept between sessions
Source:R/rational_wl2.R
rspde.cache.RdThe mesh-free weighted-L2 tables are shipped with the package,
but a table for a particular spectral interval (see rspde.wl2.table() and
the kappa_ref argument of matern.operators()) has to be computed, which
takes of the order of a second. Within a session such tables are cached in
memory. Enabling this cache stores them on disk as well, so that a second
session, or a script run again, finds them instead of refitting.
The cache is off by default: a package should not write outside the session
temporary directory unless asked to. Calling rspde.cache(TRUE) is that
request, and creates the directory. The environment variable
RSPDE_CACHE_DIR sets it for non-interactive use, for instance from
.Renviron.
Cached files are organised by package version, so upgrading the package does not read tables produced by an older fit. Within a development version, clear the cache after changing anything that affects the coefficients.