These are convenience wrappers around DBI (formerly archivist) package functions. They allow the user a bit of control over what is being cached.

clearCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  ask = getOption("reproducible.ask"),
  useCloud = FALSE,
  cloudFolderID = getOption("reproducible.cloudFolderID", NULL),
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

# S4 method for ANY
clearCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  ask = getOption("reproducible.ask"),
  useCloud = FALSE,
  cloudFolderID = getOption("reproducible.cloudFolderID", NULL),
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

cc(secs, ...)

showCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

# S4 method for ANY
showCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

keepCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  ask = getOption("reproducible.ask"),
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

# S4 method for ANY
keepCache(
  x,
  userTags = character(),
  after = NULL,
  before = NULL,
  ask = getOption("reproducible.ask"),
  drv = getOption("reproducible.drv", RSQLite::SQLite()),
  conn = getOption("reproducible.conn", NULL),
  ...
)

Arguments

x

A simList or a directory containing a valid archivist repository. Note: For compatibility with Cache argument, cacheRepo can also be used instead of x, though x will take precedence.

userTags

Character vector. If used, this will be used in place of the after and before. Specifying one or more userTag here will clear all objects that match those tags. Matching is via regular expression, meaning partial matches will work unless strict beginning (^) and end ($) of string characters are used. Matching will be against any of the 3 columns returned by showCache(), i.e., artifact, tagValue or tagName. Also, length userTags > 1, then matching is by `and`. For `or` matching, use | in a single character string. See examples.

after

A time (POSIX, character understandable by data.table). Objects cached after this time will be shown or deleted.

before

A time (POSIX, character understandable by data.table). Objects cached before this time will be shown or deleted.

ask

Logical. If FALSE, then it will not ask to confirm deletions using clearCache or keepCache. Default is TRUE

useCloud

Logical. If TRUE, then every object that is deleted locally will also be deleted in the cloudFolderID, if it is non-NULL

cloudFolderID

A googledrive dribble of a folder, e.g., using drive_mkdir(). If left as NULL, the function will create a cloud folder with name from last two folder levels of the cacheRepo path, : paste0(basename(dirname(cacheRepo)), "_", basename(cacheRepo)). This cloudFolderID will be added to options("reproducible.cloudFolderID"), but this will not persist across sessions. If this is a character string, it will treat this as a folder name to create or use on GoogleDrive.

drv

an object that inherits from DBIDriver, or an existing DBIConnection object (in order to clone an existing connection).

conn

A DBIConnection object, as returned by dbConnect().

...

Other arguments. Currently, regexp, a logical, can be provided. This must be TRUE if the use is passing a regular expression. Otherwise, userTags will need to be exact matches. Default is missing, which is the same as TRUE. If there are errors due to regular expression problem, try FALSE. For cc, it is passed to clearCache, e.g., ask, userTags

secs

Currently 3 options: the number of seconds to pass to clearCache(after = secs), a POSIXct time e.g., from Sys.time(), or missing. If missing, the default, then it will delete the most recent entry in the Cache.

Value

Will clear all objects (or those that match userTags, or those between after or before) from the repository located at cachePath of the sim object, if sim is provided, or located in cacheRepo. Invisibly returns a data.table of the removed items.

Details

If neither after or before are provided, nor userTags, then all objects will be removed. If both after and before are specified, then all objects between after and before will be deleted. If userTags is used, this will override after or before.

cc(secs) is just a shortcut for clearCache(repo = Paths$cachePath, after = secs), i.e., to remove any cache entries touched in the last secs seconds.

clearCache

remove items from the cache based on their userTag or times values.

keepCache

remove all cached items except those based on certain userTags or times values.

showCache

display the contents of the cache.

Note

If the cache is larger than 10MB, and clearCache is used, there will be a message and a pause, if interactive, to prevent accidentally deleting of a large cache repository.

See also

Examples

library(raster) tmpDir <- file.path(tempdir(), "reproducible_examples", "Cache") try(clearCache(tmpDir, ask = FALSE), silent = TRUE) # just to make sure it is clear # Basic use ranNumsA <- Cache(rnorm, 10, 16, cacheRepo = tmpDir) # All same ranNumsB <- Cache(rnorm, 10, 16, cacheRepo = tmpDir) # recovers cached copy
#> loading cached result from previous rnorm call.
ranNumsC <- Cache(cacheRepo = tmpDir) %C% rnorm(10, 16) # recovers cached copy
#> Error in match.call(definition, call, expand.dots, envir): unused argument (envir = <environment>)
ranNumsD <- Cache(quote(rnorm(n = 10, 16)), cacheRepo = tmpDir) # recovers cached copy
#> loading cached result from previous rnorm call.
# Any minor change makes it different ranNumsE <- Cache(cacheRepo = tmpDir) %C% rnorm(10, 6)# different
#> Error in match.call(definition, call, expand.dots, envir): unused argument (envir = <environment>)
## Example 1: basic cache use with tags ranNumsA <- Cache(rnorm, 4, cacheRepo = tmpDir, userTags = "objectName:a") ranNumsB <- Cache(runif, 4, cacheRepo = tmpDir, userTags = "objectName:b") ranNumsC <- Cache(runif, 40, cacheRepo = tmpDir, userTags = "objectName:b") showCache(tmpDir, userTags = c("objectName"))
#> Cache size:
#> Total (including Rasters): 828 bytes
#> Selected objects (not including Rasters): 828 bytes
#> cacheId tagKey tagValue createdDate #> 1: 3aef38d1fc02aee5 objectName b 2020-02-19 16:39:24 #> 2: 3aef38d1fc02aee5 function runif 2020-02-19 16:39:24 #> 3: 3aef38d1fc02aee5 class numeric 2020-02-19 16:39:24 #> 4: 3aef38d1fc02aee5 object.size 1008 2020-02-19 16:39:24 #> 5: 3aef38d1fc02aee5 accessed 2020-02-19 16:39:24 2020-02-19 16:39:24 #> 6: 3aef38d1fc02aee5 inCloud FALSE 2020-02-19 16:39:24 #> 7: 3aef38d1fc02aee5 otherFunctions saveRDS 2020-02-19 16:39:24 #> 8: 3aef38d1fc02aee5 otherFunctions do.call 2020-02-19 16:39:24 #> 9: 3aef38d1fc02aee5 otherFunctions build_site_local 2020-02-19 16:39:24 #> 10: 3aef38d1fc02aee5 otherFunctions build_reference 2020-02-19 16:39:24 #> 11: 3aef38d1fc02aee5 otherFunctions data_reference_topic 2020-02-19 16:39:24 #> 12: 3aef38d1fc02aee5 otherFunctions run_examples 2020-02-19 16:39:24 #> 13: 3aef38d1fc02aee5 otherFunctions highlight_examples 2020-02-19 16:39:24 #> 14: 3aef38d1fc02aee5 otherFunctions timing_fn 2020-02-19 16:39:24 #> 15: 3aef38d1fc02aee5 otherFunctions handle 2020-02-19 16:39:24 #> 16: 3aef38d1fc02aee5 otherFunctions try 2020-02-19 16:39:24 #> 17: 3aef38d1fc02aee5 otherFunctions withVisible 2020-02-19 16:39:24 #> 18: 3aef38d1fc02aee5 preDigest n:7eef4eae85fd9229 2020-02-19 16:39:24 #> 19: 3aef38d1fc02aee5 preDigest .FUN:881ec847b7161f3c 2020-02-19 16:39:24 #> 20: 3aef38d1fc02aee5 file.size 168 2020-02-19 16:39:24 #> 21: 7225b47fe5dc51d0 objectName b 2020-02-19 16:39:24 #> 22: 7225b47fe5dc51d0 function runif 2020-02-19 16:39:24 #> 23: 7225b47fe5dc51d0 class numeric 2020-02-19 16:39:24 #> 24: 7225b47fe5dc51d0 object.size 1296 2020-02-19 16:39:24 #> 25: 7225b47fe5dc51d0 accessed 2020-02-19 16:39:24 2020-02-19 16:39:24 #> 26: 7225b47fe5dc51d0 inCloud FALSE 2020-02-19 16:39:24 #> 27: 7225b47fe5dc51d0 otherFunctions saveRDS 2020-02-19 16:39:24 #> 28: 7225b47fe5dc51d0 otherFunctions do.call 2020-02-19 16:39:24 #> 29: 7225b47fe5dc51d0 otherFunctions build_site_local 2020-02-19 16:39:24 #> 30: 7225b47fe5dc51d0 otherFunctions build_reference 2020-02-19 16:39:24 #> 31: 7225b47fe5dc51d0 otherFunctions data_reference_topic 2020-02-19 16:39:24 #> 32: 7225b47fe5dc51d0 otherFunctions run_examples 2020-02-19 16:39:24 #> 33: 7225b47fe5dc51d0 otherFunctions highlight_examples 2020-02-19 16:39:24 #> 34: 7225b47fe5dc51d0 otherFunctions timing_fn 2020-02-19 16:39:24 #> 35: 7225b47fe5dc51d0 otherFunctions handle 2020-02-19 16:39:24 #> 36: 7225b47fe5dc51d0 otherFunctions try 2020-02-19 16:39:24 #> 37: 7225b47fe5dc51d0 otherFunctions withVisible 2020-02-19 16:39:24 #> 38: 7225b47fe5dc51d0 preDigest n:1393aef18608c8be 2020-02-19 16:39:24 #> 39: 7225b47fe5dc51d0 preDigest .FUN:881ec847b7161f3c 2020-02-19 16:39:24 #> 40: 7225b47fe5dc51d0 file.size 396 2020-02-19 16:39:24 #> 41: f7bee22047b8d0c1 objectName a 2020-02-19 16:39:24 #> 42: f7bee22047b8d0c1 function rnorm 2020-02-19 16:39:24 #> 43: f7bee22047b8d0c1 class numeric 2020-02-19 16:39:24 #> 44: f7bee22047b8d0c1 object.size 1008 2020-02-19 16:39:24 #> 45: f7bee22047b8d0c1 accessed 2020-02-19 16:39:24 2020-02-19 16:39:24 #> 46: f7bee22047b8d0c1 inCloud FALSE 2020-02-19 16:39:24 #> 47: f7bee22047b8d0c1 otherFunctions saveRDS 2020-02-19 16:39:24 #> 48: f7bee22047b8d0c1 otherFunctions do.call 2020-02-19 16:39:24 #> 49: f7bee22047b8d0c1 otherFunctions build_site_local 2020-02-19 16:39:24 #> 50: f7bee22047b8d0c1 otherFunctions build_reference 2020-02-19 16:39:24 #> 51: f7bee22047b8d0c1 otherFunctions data_reference_topic 2020-02-19 16:39:24 #> 52: f7bee22047b8d0c1 otherFunctions run_examples 2020-02-19 16:39:24 #> 53: f7bee22047b8d0c1 otherFunctions highlight_examples 2020-02-19 16:39:24 #> 54: f7bee22047b8d0c1 otherFunctions timing_fn 2020-02-19 16:39:24 #> 55: f7bee22047b8d0c1 otherFunctions handle 2020-02-19 16:39:24 #> 56: f7bee22047b8d0c1 otherFunctions try 2020-02-19 16:39:24 #> 57: f7bee22047b8d0c1 otherFunctions withVisible 2020-02-19 16:39:24 #> 58: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 2020-02-19 16:39:24 #> 59: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:24 #> 60: f7bee22047b8d0c1 file.size 176 2020-02-19 16:39:24 #> cacheId tagKey tagValue createdDate
showCache(tmpDir, userTags = c("^a$")) # regular expression ... "a" exactly
#> Cache size:
#> Total (including Rasters): 252 bytes
#> Selected objects (not including Rasters): 252 bytes
#> cacheId tagKey tagValue createdDate #> 1: f7bee22047b8d0c1 objectName a 2020-02-19 16:39:24 #> 2: f7bee22047b8d0c1 function rnorm 2020-02-19 16:39:24 #> 3: f7bee22047b8d0c1 class numeric 2020-02-19 16:39:24 #> 4: f7bee22047b8d0c1 object.size 1008 2020-02-19 16:39:24 #> 5: f7bee22047b8d0c1 accessed 2020-02-19 16:39:24 2020-02-19 16:39:24 #> 6: f7bee22047b8d0c1 inCloud FALSE 2020-02-19 16:39:24 #> 7: f7bee22047b8d0c1 otherFunctions saveRDS 2020-02-19 16:39:24 #> 8: f7bee22047b8d0c1 otherFunctions do.call 2020-02-19 16:39:24 #> 9: f7bee22047b8d0c1 otherFunctions build_site_local 2020-02-19 16:39:24 #> 10: f7bee22047b8d0c1 otherFunctions build_reference 2020-02-19 16:39:24 #> 11: f7bee22047b8d0c1 otherFunctions data_reference_topic 2020-02-19 16:39:24 #> 12: f7bee22047b8d0c1 otherFunctions run_examples 2020-02-19 16:39:24 #> 13: f7bee22047b8d0c1 otherFunctions highlight_examples 2020-02-19 16:39:24 #> 14: f7bee22047b8d0c1 otherFunctions timing_fn 2020-02-19 16:39:24 #> 15: f7bee22047b8d0c1 otherFunctions handle 2020-02-19 16:39:24 #> 16: f7bee22047b8d0c1 otherFunctions try 2020-02-19 16:39:24 #> 17: f7bee22047b8d0c1 otherFunctions withVisible 2020-02-19 16:39:24 #> 18: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 2020-02-19 16:39:24 #> 19: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:24 #> 20: f7bee22047b8d0c1 file.size 176 2020-02-19 16:39:24
# Fine control of cache elements -- pick out only the large runif object, and remove it cache1 <- showCache(tmpDir, userTags = c("runif")) # show only cached objects made during runif
#> Cache size:
#> Total (including Rasters): 576 bytes
#> Selected objects (not including Rasters): 576 bytes
toRemove <- cache1[tagKey == "object.size"][as.numeric(tagValue) > 700]$cacheId clearCache(tmpDir, userTags = toRemove, ask = FALSE)
#> Cache size:
#> Total (including Rasters): 0 bytes
#> Selected objects (not including Rasters): 0 bytes
cacheAfter <- showCache(tmpDir, userTags = c("runif")) # Only the small one is left
#> Cache size:
#> Total (including Rasters): 576 bytes
#> Selected objects (not including Rasters): 576 bytes
tmpDir <- file.path(tempdir(), "reproducible_examples", "Cache") try(clearCache(tmpDir, ask = FALSE), silent = TRUE) # just to make sure it is clear Cache(rnorm, 1, cacheRepo = tmpDir)
#> [1] -0.8554131 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:7072c305d8c69df0" #> attr(,"call") #> [1] ""
thisTime <- Sys.time() Cache(rnorm, 2, cacheRepo = tmpDir)
#> [1] -0.1449016 -0.3244470 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:3b347dee8f6305c7" #> attr(,"call") #> [1] ""
Cache(rnorm, 3, cacheRepo = tmpDir)
#> [1] -0.1725649 -1.2360629 -1.9023042 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:f0da91a44b839434" #> attr(,"call") #> [1] ""
Cache(rnorm, 4, cacheRepo = tmpDir)
#> [1] -0.09450402 0.03255579 0.46129012 1.38140030 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:f7bee22047b8d0c1" #> attr(,"call") #> [1] ""
showCache(x = tmpDir) # shows all 4 entries
#> Cache size:
#> Total (including Rasters): 998 bytes
#> Selected objects (not including Rasters): 998 bytes
#> cacheId tagKey tagValue createdDate #> 1: 7072c305d8c69df0 function rnorm 2020-02-19 16:39:25 #> 2: 7072c305d8c69df0 class numeric 2020-02-19 16:39:25 #> 3: 7072c305d8c69df0 object.size 984 2020-02-19 16:39:25 #> 4: 7072c305d8c69df0 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 5: 7072c305d8c69df0 inCloud FALSE 2020-02-19 16:39:25 #> 6: 7072c305d8c69df0 otherFunctions saveRDS 2020-02-19 16:39:25 #> 7: 7072c305d8c69df0 otherFunctions do.call 2020-02-19 16:39:25 #> 8: 7072c305d8c69df0 otherFunctions build_site_local 2020-02-19 16:39:25 #> 9: 7072c305d8c69df0 otherFunctions build_reference 2020-02-19 16:39:25 #> 10: 7072c305d8c69df0 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 11: 7072c305d8c69df0 otherFunctions run_examples 2020-02-19 16:39:25 #> 12: 7072c305d8c69df0 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 13: 7072c305d8c69df0 otherFunctions timing_fn 2020-02-19 16:39:25 #> 14: 7072c305d8c69df0 otherFunctions handle 2020-02-19 16:39:25 #> 15: 7072c305d8c69df0 otherFunctions try 2020-02-19 16:39:25 #> 16: 7072c305d8c69df0 otherFunctions withVisible 2020-02-19 16:39:25 #> 17: 7072c305d8c69df0 preDigest n:853b1797f54b229c 2020-02-19 16:39:25 #> 18: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 19: 7072c305d8c69df0 file.size 149 2020-02-19 16:39:25 #> 20: 3b347dee8f6305c7 function rnorm 2020-02-19 16:39:25 #> 21: 3b347dee8f6305c7 class numeric 2020-02-19 16:39:25 #> 22: 3b347dee8f6305c7 object.size 992 2020-02-19 16:39:25 #> 23: 3b347dee8f6305c7 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 24: 3b347dee8f6305c7 inCloud FALSE 2020-02-19 16:39:25 #> 25: 3b347dee8f6305c7 otherFunctions saveRDS 2020-02-19 16:39:25 #> 26: 3b347dee8f6305c7 otherFunctions do.call 2020-02-19 16:39:25 #> 27: 3b347dee8f6305c7 otherFunctions build_site_local 2020-02-19 16:39:25 #> 28: 3b347dee8f6305c7 otherFunctions build_reference 2020-02-19 16:39:25 #> 29: 3b347dee8f6305c7 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 30: 3b347dee8f6305c7 otherFunctions run_examples 2020-02-19 16:39:25 #> 31: 3b347dee8f6305c7 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 32: 3b347dee8f6305c7 otherFunctions timing_fn 2020-02-19 16:39:25 #> 33: 3b347dee8f6305c7 otherFunctions handle 2020-02-19 16:39:25 #> 34: 3b347dee8f6305c7 otherFunctions try 2020-02-19 16:39:25 #> 35: 3b347dee8f6305c7 otherFunctions withVisible 2020-02-19 16:39:25 #> 36: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a 2020-02-19 16:39:25 #> 37: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 38: 3b347dee8f6305c7 file.size 159 2020-02-19 16:39:25 #> 39: f0da91a44b839434 function rnorm 2020-02-19 16:39:26 #> 40: f0da91a44b839434 class numeric 2020-02-19 16:39:26 #> 41: f0da91a44b839434 object.size 1008 2020-02-19 16:39:26 #> 42: f0da91a44b839434 accessed 2020-02-19 16:39:26 2020-02-19 16:39:26 #> 43: f0da91a44b839434 inCloud FALSE 2020-02-19 16:39:26 #> 44: f0da91a44b839434 otherFunctions saveRDS 2020-02-19 16:39:26 #> 45: f0da91a44b839434 otherFunctions do.call 2020-02-19 16:39:26 #> 46: f0da91a44b839434 otherFunctions build_site_local 2020-02-19 16:39:26 #> 47: f0da91a44b839434 otherFunctions build_reference 2020-02-19 16:39:26 #> 48: f0da91a44b839434 otherFunctions data_reference_topic 2020-02-19 16:39:26 #> 49: f0da91a44b839434 otherFunctions run_examples 2020-02-19 16:39:26 #> 50: f0da91a44b839434 otherFunctions highlight_examples 2020-02-19 16:39:26 #> 51: f0da91a44b839434 otherFunctions timing_fn 2020-02-19 16:39:26 #> 52: f0da91a44b839434 otherFunctions handle 2020-02-19 16:39:26 #> 53: f0da91a44b839434 otherFunctions try 2020-02-19 16:39:26 #> 54: f0da91a44b839434 otherFunctions withVisible 2020-02-19 16:39:26 #> 55: f0da91a44b839434 preDigest n:7f12988bd88a0fb8 2020-02-19 16:39:26 #> 56: f0da91a44b839434 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:26 #> 57: f0da91a44b839434 file.size 167 2020-02-19 16:39:26 #> 58: f7bee22047b8d0c1 function rnorm 2020-02-19 16:39:27 #> 59: f7bee22047b8d0c1 class numeric 2020-02-19 16:39:27 #> 60: f7bee22047b8d0c1 object.size 1008 2020-02-19 16:39:27 #> 61: f7bee22047b8d0c1 accessed 2020-02-19 16:39:27 2020-02-19 16:39:27 #> 62: f7bee22047b8d0c1 inCloud FALSE 2020-02-19 16:39:27 #> 63: f7bee22047b8d0c1 otherFunctions saveRDS 2020-02-19 16:39:27 #> 64: f7bee22047b8d0c1 otherFunctions do.call 2020-02-19 16:39:27 #> 65: f7bee22047b8d0c1 otherFunctions build_site_local 2020-02-19 16:39:27 #> 66: f7bee22047b8d0c1 otherFunctions build_reference 2020-02-19 16:39:27 #> 67: f7bee22047b8d0c1 otherFunctions data_reference_topic 2020-02-19 16:39:27 #> 68: f7bee22047b8d0c1 otherFunctions run_examples 2020-02-19 16:39:27 #> 69: f7bee22047b8d0c1 otherFunctions highlight_examples 2020-02-19 16:39:27 #> 70: f7bee22047b8d0c1 otherFunctions timing_fn 2020-02-19 16:39:27 #> 71: f7bee22047b8d0c1 otherFunctions handle 2020-02-19 16:39:27 #> 72: f7bee22047b8d0c1 otherFunctions try 2020-02-19 16:39:27 #> 73: f7bee22047b8d0c1 otherFunctions withVisible 2020-02-19 16:39:27 #> 74: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 2020-02-19 16:39:27 #> 75: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:27 #> 76: f7bee22047b8d0c1 file.size 175 2020-02-19 16:39:27 #> cacheId tagKey tagValue createdDate
cc(ask = FALSE, x = tmpDir)
#> No time provided; removing the most recent entry to the Cache
#> Cache size:
#> Total (including Rasters): 252 bytes
#> Selected objects (not including Rasters): 252 bytes
showCache(x = tmpDir) # most recent is gone
#> Cache size:
#> Total (including Rasters): 746 bytes
#> Selected objects (not including Rasters): 746 bytes
#> cacheId tagKey tagValue createdDate #> 1: 7072c305d8c69df0 function rnorm 2020-02-19 16:39:25 #> 2: 7072c305d8c69df0 class numeric 2020-02-19 16:39:25 #> 3: 7072c305d8c69df0 object.size 984 2020-02-19 16:39:25 #> 4: 7072c305d8c69df0 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 5: 7072c305d8c69df0 inCloud FALSE 2020-02-19 16:39:25 #> 6: 7072c305d8c69df0 otherFunctions saveRDS 2020-02-19 16:39:25 #> 7: 7072c305d8c69df0 otherFunctions do.call 2020-02-19 16:39:25 #> 8: 7072c305d8c69df0 otherFunctions build_site_local 2020-02-19 16:39:25 #> 9: 7072c305d8c69df0 otherFunctions build_reference 2020-02-19 16:39:25 #> 10: 7072c305d8c69df0 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 11: 7072c305d8c69df0 otherFunctions run_examples 2020-02-19 16:39:25 #> 12: 7072c305d8c69df0 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 13: 7072c305d8c69df0 otherFunctions timing_fn 2020-02-19 16:39:25 #> 14: 7072c305d8c69df0 otherFunctions handle 2020-02-19 16:39:25 #> 15: 7072c305d8c69df0 otherFunctions try 2020-02-19 16:39:25 #> 16: 7072c305d8c69df0 otherFunctions withVisible 2020-02-19 16:39:25 #> 17: 7072c305d8c69df0 preDigest n:853b1797f54b229c 2020-02-19 16:39:25 #> 18: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 19: 7072c305d8c69df0 file.size 149 2020-02-19 16:39:25 #> 20: 3b347dee8f6305c7 function rnorm 2020-02-19 16:39:25 #> 21: 3b347dee8f6305c7 class numeric 2020-02-19 16:39:25 #> 22: 3b347dee8f6305c7 object.size 992 2020-02-19 16:39:25 #> 23: 3b347dee8f6305c7 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 24: 3b347dee8f6305c7 inCloud FALSE 2020-02-19 16:39:25 #> 25: 3b347dee8f6305c7 otherFunctions saveRDS 2020-02-19 16:39:25 #> 26: 3b347dee8f6305c7 otherFunctions do.call 2020-02-19 16:39:25 #> 27: 3b347dee8f6305c7 otherFunctions build_site_local 2020-02-19 16:39:25 #> 28: 3b347dee8f6305c7 otherFunctions build_reference 2020-02-19 16:39:25 #> 29: 3b347dee8f6305c7 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 30: 3b347dee8f6305c7 otherFunctions run_examples 2020-02-19 16:39:25 #> 31: 3b347dee8f6305c7 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 32: 3b347dee8f6305c7 otherFunctions timing_fn 2020-02-19 16:39:25 #> 33: 3b347dee8f6305c7 otherFunctions handle 2020-02-19 16:39:25 #> 34: 3b347dee8f6305c7 otherFunctions try 2020-02-19 16:39:25 #> 35: 3b347dee8f6305c7 otherFunctions withVisible 2020-02-19 16:39:25 #> 36: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a 2020-02-19 16:39:25 #> 37: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 38: 3b347dee8f6305c7 file.size 159 2020-02-19 16:39:25 #> 39: f0da91a44b839434 function rnorm 2020-02-19 16:39:26 #> 40: f0da91a44b839434 class numeric 2020-02-19 16:39:26 #> 41: f0da91a44b839434 object.size 1008 2020-02-19 16:39:26 #> 42: f0da91a44b839434 accessed 2020-02-19 16:39:26 2020-02-19 16:39:26 #> 43: f0da91a44b839434 inCloud FALSE 2020-02-19 16:39:26 #> 44: f0da91a44b839434 otherFunctions saveRDS 2020-02-19 16:39:26 #> 45: f0da91a44b839434 otherFunctions do.call 2020-02-19 16:39:26 #> 46: f0da91a44b839434 otherFunctions build_site_local 2020-02-19 16:39:26 #> 47: f0da91a44b839434 otherFunctions build_reference 2020-02-19 16:39:26 #> 48: f0da91a44b839434 otherFunctions data_reference_topic 2020-02-19 16:39:26 #> 49: f0da91a44b839434 otherFunctions run_examples 2020-02-19 16:39:26 #> 50: f0da91a44b839434 otherFunctions highlight_examples 2020-02-19 16:39:26 #> 51: f0da91a44b839434 otherFunctions timing_fn 2020-02-19 16:39:26 #> 52: f0da91a44b839434 otherFunctions handle 2020-02-19 16:39:26 #> 53: f0da91a44b839434 otherFunctions try 2020-02-19 16:39:26 #> 54: f0da91a44b839434 otherFunctions withVisible 2020-02-19 16:39:26 #> 55: f0da91a44b839434 preDigest n:7f12988bd88a0fb8 2020-02-19 16:39:26 #> 56: f0da91a44b839434 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:26 #> 57: f0da91a44b839434 file.size 167 2020-02-19 16:39:26 #> cacheId tagKey tagValue createdDate
cc(thisTime, ask = FALSE, x = tmpDir)
#> Cache size:
#> Total (including Rasters): 252 bytes
#> Selected objects (not including Rasters): 252 bytes
showCache(x = tmpDir) # all those after thisTime gone, i.e., only 1 left
#> Cache size:
#> Total (including Rasters): 494 bytes
#> Selected objects (not including Rasters): 494 bytes
#> cacheId tagKey tagValue createdDate #> 1: 7072c305d8c69df0 function rnorm 2020-02-19 16:39:25 #> 2: 7072c305d8c69df0 class numeric 2020-02-19 16:39:25 #> 3: 7072c305d8c69df0 object.size 984 2020-02-19 16:39:25 #> 4: 7072c305d8c69df0 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 5: 7072c305d8c69df0 inCloud FALSE 2020-02-19 16:39:25 #> 6: 7072c305d8c69df0 otherFunctions saveRDS 2020-02-19 16:39:25 #> 7: 7072c305d8c69df0 otherFunctions do.call 2020-02-19 16:39:25 #> 8: 7072c305d8c69df0 otherFunctions build_site_local 2020-02-19 16:39:25 #> 9: 7072c305d8c69df0 otherFunctions build_reference 2020-02-19 16:39:25 #> 10: 7072c305d8c69df0 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 11: 7072c305d8c69df0 otherFunctions run_examples 2020-02-19 16:39:25 #> 12: 7072c305d8c69df0 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 13: 7072c305d8c69df0 otherFunctions timing_fn 2020-02-19 16:39:25 #> 14: 7072c305d8c69df0 otherFunctions handle 2020-02-19 16:39:25 #> 15: 7072c305d8c69df0 otherFunctions try 2020-02-19 16:39:25 #> 16: 7072c305d8c69df0 otherFunctions withVisible 2020-02-19 16:39:25 #> 17: 7072c305d8c69df0 preDigest n:853b1797f54b229c 2020-02-19 16:39:25 #> 18: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 19: 7072c305d8c69df0 file.size 149 2020-02-19 16:39:25 #> 20: 3b347dee8f6305c7 function rnorm 2020-02-19 16:39:25 #> 21: 3b347dee8f6305c7 class numeric 2020-02-19 16:39:25 #> 22: 3b347dee8f6305c7 object.size 992 2020-02-19 16:39:25 #> 23: 3b347dee8f6305c7 accessed 2020-02-19 16:39:25 2020-02-19 16:39:25 #> 24: 3b347dee8f6305c7 inCloud FALSE 2020-02-19 16:39:25 #> 25: 3b347dee8f6305c7 otherFunctions saveRDS 2020-02-19 16:39:25 #> 26: 3b347dee8f6305c7 otherFunctions do.call 2020-02-19 16:39:25 #> 27: 3b347dee8f6305c7 otherFunctions build_site_local 2020-02-19 16:39:25 #> 28: 3b347dee8f6305c7 otherFunctions build_reference 2020-02-19 16:39:25 #> 29: 3b347dee8f6305c7 otherFunctions data_reference_topic 2020-02-19 16:39:25 #> 30: 3b347dee8f6305c7 otherFunctions run_examples 2020-02-19 16:39:25 #> 31: 3b347dee8f6305c7 otherFunctions highlight_examples 2020-02-19 16:39:25 #> 32: 3b347dee8f6305c7 otherFunctions timing_fn 2020-02-19 16:39:25 #> 33: 3b347dee8f6305c7 otherFunctions handle 2020-02-19 16:39:25 #> 34: 3b347dee8f6305c7 otherFunctions try 2020-02-19 16:39:25 #> 35: 3b347dee8f6305c7 otherFunctions withVisible 2020-02-19 16:39:25 #> 36: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a 2020-02-19 16:39:25 #> 37: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 2020-02-19 16:39:25 #> 38: 3b347dee8f6305c7 file.size 159 2020-02-19 16:39:25 #> cacheId tagKey tagValue createdDate
cc(ask = FALSE, x = tmpDir) # Cache is
#> No time provided; removing the most recent entry to the Cache
#> Cache size:
#> Total (including Rasters): 248 bytes
#> Selected objects (not including Rasters): 248 bytes
cc(ask = FALSE, x = tmpDir) # Cache is already empty
#> No time provided; removing the most recent entry to the Cache
#> Cache size:
#> Total (including Rasters): 246 bytes
#> Selected objects (not including Rasters): 246 bytes