Debian Codegraph @

man/clean_cache.Rd

raw
1 % Generated by roxygen2: do not edit by hand
2 % Please edit documentation in R/cache.R
3 \name{clean_cache}
4 \alias{clean_cache}
5 \title{Clean cache files that are probably no longer needed}
6 \usage{
7 clean_cache(clean = FALSE, path = opts_chunk$get("cache.path"))
8 }
9 \arguments{
10 \item{clean}{Boolean; whether to remove the files.}
11
12 \item{path}{Path to the cache.}
13 }
14 \description{
15 If you remove or rename some cached code chunks, their original cache files
16 will not be automatically cleaned. You can use this function to identify
17 these possible files, and clean them if you are sure they are no longer
18 needed.
19 }
20 \note{
21 The identification is not guaranteed to be correct, especially when
22 multiple documents share the same cache directory. You are recommended to
23 call \code{clean_cache(FALSE)} and carefully check the list of files (if
24 any) before you really delete them (\code{clean_cache(TRUE)}).
25
26 This function must be called within a code chunk in a source document,
27 since it needs to know all chunk labels of the current document to
28 determine which labels are no longer present, and delete cache
29 corresponding to these labels.
30 }