Take cache files as they are where there is no time to recompute
A file that does not match is recomputed, which is the right default and
useless ten minutes before a talk: a collocation analysis runs for hours,
and the stale file is overwritten on the way. withCachedResults() takes
the files as they are while an expression is evaluated, and puts the mode
back afterwards, so that a document can be knitted from what is on disk
without a stray options() call outliving it. mode = "offline" goes
further and refuses to compute at all, which turns a missing file into an
error now rather than an unfinished talk later.
The same is available document-wide through options(rkorap.cacheAs=) or
KORAP_CACHE_AS, following the rkorap.verbose and KORAP_VERBOSE pair
already there. A file used although it does not match is still reported,
so that outdated numbers do not pass unremarked, and the warning about a
refused file now names the two ways out.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Change-Id: Ied5d88ea452f5cc39f8ceafbbb4035575641a682
diff --git a/man/cacheAsInfo.Rd b/man/cacheAsInfo.Rd
index 73324b3..1ed3b0b 100644
--- a/man/cacheAsInfo.Rd
+++ b/man/cacheAsInfo.Rd
@@ -31,6 +31,7 @@
}
\seealso{
Other cacheAs:
-\code{\link[=blessCacheAs]{blessCacheAs()}}
+\code{\link[=blessCacheAs]{blessCacheAs()}},
+\code{\link[=withCachedResults]{withCachedResults()}}
}
\concept{cacheAs}