Counts the files in each subfolder of the cache folder returned by
cacs_cache_dir() and reports their total size and their oldest and
newest modification times. The folder is not created if it does not
exist. For a folder given in the cache_dir argument of another function,
first set the option to it, as in
options(catchmentACS.cache_dir = "path/to/folder").
Value
A tibble with one row for each subfolder (isochrone, acs,
acs_test, and intersect; see cacs_clear_cache()) and these
columns:
namespaceThe subfolder.
n_entriesThe number of saved results (
.rdsfiles).orphan_tmpThe number of temporary
.rds.tmpfiles, which are left when a write is interrupted and are never read.n_fingerprintsThe number of checksum files (
.fingerprintfiles; seecacs_cache_dir()).orphan_fingerprint_tmpThe number of temporary
.fingerprint.tmpfiles, left in the same way.legacy_entriesThe number of
.rdsfiles without a checksum file, such as those saved by versions of the package before 0.3.0. Such a file is deleted, and the result computed again, when a later call looks for it.total_size_mbThe total size of these files and of the GeoPackage files written by
cacs_acs_prefetch(write_gpkg = TRUE), in megabytes (1024^2bytes).oldest,newestThe earliest and latest modification times of the same files, or
NAwhen there are none. Reading a saved result updates its modification time.
Other files are not counted.
See also
Other cache and configuration:
cacs_cache_dir(),
cacs_clear_cache(),
cacs_get_cache_state(),
cacs_set_cache()
Examples
cacs_cache_status()
#> # A tibble: 4 × 9
#> namespace n_entries orphan_tmp n_fingerprints orphan_fingerprint_tmp
#> <chr> <int> <int> <int> <int>
#> 1 isochrone 0 0 0 0
#> 2 acs 0 0 0 0
#> 3 acs_test 0 0 0 0
#> 4 intersect 0 0 0 0
#> # ℹ 4 more variables: legacy_entries <int>, total_size_mb <dbl>, oldest <dttm>,
#> # newest <dttm>