% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cache.R \name{cache_summary} \alias{cache_summary} \alias{cache_list} \alias{cache_delete} \alias{cache_clean} \title{Package cache utilities} \usage{ cache_summary() cache_list(...) cache_delete(...) cache_clean() } \arguments{ \item{...}{For \code{cache_list()} and \code{cache_delete()}, \code{...} may contain filters, where the argument name is the column name. E.g. \code{package}, \code{version}, etc. Call \code{cache_list()} without arguments to see the available column names. If you call \code{cache_delete()} without arguments, it will delete all cached files.} } \value{ \code{cache_summary()} returns a list with elements: \itemize{ \item \code{cachepath}: absolute path to the package cache \item \code{files}: number of files (packages) in the cache \item \code{size}: total size of package cache in bytes } \code{cache_list()} returns a data frame with the data about the cache. \code{cache_delete()} returns nothing. \code{cache_clean()} returns nothing. } \description{ Various utilities to inspect and clean the package cache. See the pkgcache package if you need for control over the package cache. } \details{ \code{cache_summary()} returns a summary of the package cache. \code{cache_list()} lists all (by default), or a subset of packages in the package cache. \code{cache_delete()} deletes files from the cache. \code{cache_clean()} deletes all files from the cache. } \section{Examples}{ \if{html}{\out{
    }}\preformatted{cache_summary()
    }\if{html}{\out{
}}\if{html}{\out{

    #> $cachepath
    #> [1] "/Users/gaborcsardi/Library/Caches/org.R-project.R/R/pkgcache/pkg"
    #>
    #> $files
    #> [1] 483
    #>
    #> $size
    #> [1] 654662486
    #>

}} \if{html}{\out{
    }}\preformatted{cache_list()
    }\if{html}{\out{
}}\if{html}{\out{

    #> # A data frame: 483 × 11
    #>    fullpath       path  package url   etag  sha256 version platf…¹ built
    #>    <chr>          <chr> <chr>   <chr> <chr> <chr>  <chr>   <chr>   <int>
    #>  1 /Users/gaborc… arch… NA      http… "\\"1… 0c8f0… NA      NA         NA
    #>  2 /Users/gaborc… bin/… evalua… http… "\\"1… 08a39… 0.17    aarch6…    NA
    #>  3 /Users/gaborc… bin/… crayon  http… "\\"2… 1e6d5… 1.5.2   aarch6…    NA
    #>  4 /Users/gaborc… bin/… common… http… "\\"4… 47b4a… 1.8.1   aarch6…    NA
    #>  5 /Users/gaborc… bin/… curl    http… "\\"b… 7b8ba… 4.3.3   aarch6…    NA
    #>  6 /Users/gaborc… bin/… tinytex http… "\\"2… 7e9ba… 0.42    aarch6…    NA
    #>  7 /Users/gaborc… bin/… jsonli… http… "\\"1… 68e59… 1.8.2   aarch6…    NA
    #>  8 /Users/gaborc… bin/… lifecy… http… "\\"1… 7ce27… 1.0.3   aarch6…    NA
    #>  9 /Users/gaborc… bin/… vctrs   http… "\\"1… c3a69… 0.4.2   aarch6…    NA
    #> 10 /Users/gaborc… src/… pkgcac… NA     NA   9b70a… NA      NA          0
    #> # … with 473 more rows, 2 more variables: vignettes <int>,
    #> #   rversion <chr>, and abbreviated variable name ¹​platform

}} \if{html}{\out{
    }}\preformatted{cache_list(package = "recipes")
    }\if{html}{\out{
}}\if{html}{\out{

    #> # A data frame: 1 × 11
    #>   fullp…¹ path  package url   etag  sha256 version platf…² built vigne…³
    #>   <chr>   <chr> <chr>   <chr> <chr> <chr>  <chr>   <chr>   <int>   <int>
    #> 1 /Users… bin/… recipes http… "\\"1… e281e… 1.0.2   aarch6…    NA      NA
    #> # … with 1 more variable: rversion <chr>, and abbreviated variable
    #> #   names ¹​fullpath, ²​platform, ³​vignettes

}} \if{html}{\out{
    }}\preformatted{cache_list(platform = "source")
    }\if{html}{\out{
}}\if{html}{\out{

    #> # A data frame: 69 × 11
    #>    fullpath       path  package url   etag  sha256 version platf…¹ built
    #>    <chr>          <chr> <chr>   <chr> <chr> <chr>  <chr>   <chr>   <int>
    #>  1 /Users/gaborc… src/… crayon  http… "\\"9… 70a9a… 1.5.2   source     NA
    #>  2 /Users/gaborc… src/… zip     http… "\\"1… 14873… 2.2.1   source     NA
    #>  3 /Users/gaborc… src/… curl    http… "\\"a… 3567b… 4.3.3   source     NA
    #>  4 /Users/gaborc… src/… rlang   http… "\\"b… e6973… 1.0.6   source     NA
    #>  5 /Users/gaborc… src/… openssl http… "\\"1… 7cde9… 2.0.3   source     NA
    #>  6 /Users/gaborc… src/… tinytex http… "\\"8… 205f7… 0.42    source     NA
    #>  7 /Users/gaborc… src/… evalua… http… "\\"6… 49c74… 0.17    source     NA
    #>  8 /Users/gaborc… src/… Rcpp    http… "\\"2… 807ce… 1.0.9   source     NA
    #>  9 /Users/gaborc… src/… knitr   http… "\\"d… 9b8f9… 1.40    source     NA
    #> 10 /Users/gaborc… src/… lpSolve http… "\\"7… f7258… 5.6.17  source     NA
    #> # … with 59 more rows, 2 more variables: vignettes <int>,
    #> #   rversion <chr>, and abbreviated variable name ¹​platform

}} \if{html}{\out{
    }}\preformatted{cache_delete(package = "knitr")
    cache_delete(platform = "macos")
    }\if{html}{\out{
}} \if{html}{\out{
    }}\preformatted{cache_clean()
    }\if{html}{\out{
}} }