These are convenience wrappers around DBI 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 Cache 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

mergeCache. Many more examples in Cache.

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
#> ...(Object to retrieve (f11fb1a2880f8060.rds))
#> loaded 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
#> ...(Object to retrieve (f11fb1a2880f8060.rds))
#> loaded 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 #> 1: 3aef38d1fc02aee5 objectName b #> 2: 3aef38d1fc02aee5 function runif #> 3: 3aef38d1fc02aee5 class numeric #> 4: 3aef38d1fc02aee5 object.size 1008 #> 5: 3aef38d1fc02aee5 accessed 2020-05-19 10:14:24 #> 6: 3aef38d1fc02aee5 inCloud FALSE #> 7: 3aef38d1fc02aee5 resultHash #> 8: 3aef38d1fc02aee5 elapsedTimeDigest 0.0005748272 secs #> 9: 3aef38d1fc02aee5 elapsedTimeFirstRun 1.907349e-05 secs #> 10: 3aef38d1fc02aee5 otherFunctions saveRDS #> 11: 3aef38d1fc02aee5 otherFunctions do.call #> 12: 3aef38d1fc02aee5 otherFunctions build_site_local #> 13: 3aef38d1fc02aee5 otherFunctions build_reference #> 14: 3aef38d1fc02aee5 otherFunctions data_reference_topic #> 15: 3aef38d1fc02aee5 otherFunctions run_examples #> 16: 3aef38d1fc02aee5 otherFunctions highlight_examples #> 17: 3aef38d1fc02aee5 otherFunctions timing_fn #> 18: 3aef38d1fc02aee5 otherFunctions handle #> 19: 3aef38d1fc02aee5 otherFunctions try #> 20: 3aef38d1fc02aee5 preDigest n:7eef4eae85fd9229 #> 21: 3aef38d1fc02aee5 preDigest .FUN:881ec847b7161f3c #> 22: 3aef38d1fc02aee5 file.size 166 #> 23: 7225b47fe5dc51d0 objectName b #> 24: 7225b47fe5dc51d0 function runif #> 25: 7225b47fe5dc51d0 class numeric #> 26: 7225b47fe5dc51d0 object.size 1296 #> 27: 7225b47fe5dc51d0 accessed 2020-05-19 10:14:24 #> 28: 7225b47fe5dc51d0 inCloud FALSE #> 29: 7225b47fe5dc51d0 resultHash #> 30: 7225b47fe5dc51d0 elapsedTimeDigest 0.0008294582 secs #> 31: 7225b47fe5dc51d0 elapsedTimeFirstRun 1.692772e-05 secs #> 32: 7225b47fe5dc51d0 otherFunctions saveRDS #> 33: 7225b47fe5dc51d0 otherFunctions do.call #> 34: 7225b47fe5dc51d0 otherFunctions build_site_local #> 35: 7225b47fe5dc51d0 otherFunctions build_reference #> 36: 7225b47fe5dc51d0 otherFunctions data_reference_topic #> 37: 7225b47fe5dc51d0 otherFunctions run_examples #> 38: 7225b47fe5dc51d0 otherFunctions highlight_examples #> 39: 7225b47fe5dc51d0 otherFunctions timing_fn #> 40: 7225b47fe5dc51d0 otherFunctions handle #> 41: 7225b47fe5dc51d0 otherFunctions try #> 42: 7225b47fe5dc51d0 preDigest n:1393aef18608c8be #> 43: 7225b47fe5dc51d0 preDigest .FUN:881ec847b7161f3c #> 44: 7225b47fe5dc51d0 file.size 394 #> 45: f7bee22047b8d0c1 objectName a #> 46: f7bee22047b8d0c1 function rnorm #> 47: f7bee22047b8d0c1 class numeric #> 48: f7bee22047b8d0c1 object.size 1008 #> 49: f7bee22047b8d0c1 accessed 2020-05-19 10:14:24 #> 50: f7bee22047b8d0c1 inCloud FALSE #> 51: f7bee22047b8d0c1 resultHash #> 52: f7bee22047b8d0c1 elapsedTimeDigest 0.0005664825 secs #> 53: f7bee22047b8d0c1 elapsedTimeFirstRun 1.716614e-05 secs #> 54: f7bee22047b8d0c1 otherFunctions saveRDS #> 55: f7bee22047b8d0c1 otherFunctions do.call #> 56: f7bee22047b8d0c1 otherFunctions build_site_local #> 57: f7bee22047b8d0c1 otherFunctions build_reference #> 58: f7bee22047b8d0c1 otherFunctions data_reference_topic #> 59: f7bee22047b8d0c1 otherFunctions run_examples #> 60: f7bee22047b8d0c1 otherFunctions highlight_examples #> 61: f7bee22047b8d0c1 otherFunctions timing_fn #> 62: f7bee22047b8d0c1 otherFunctions handle #> 63: f7bee22047b8d0c1 otherFunctions try #> 64: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 #> 65: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 #> 66: f7bee22047b8d0c1 file.size 173 #> cacheId tagKey tagValue #> createdDate #> 1: 2020-05-19 10:14:24 #> 2: 2020-05-19 10:14:24 #> 3: 2020-05-19 10:14:24 #> 4: 2020-05-19 10:14:24 #> 5: 2020-05-19 10:14:24 #> 6: 2020-05-19 10:14:24 #> 7: 2020-05-19 10:14:24 #> 8: 2020-05-19 10:14:24 #> 9: 2020-05-19 10:14:24 #> 10: 2020-05-19 10:14:24 #> 11: 2020-05-19 10:14:24 #> 12: 2020-05-19 10:14:24 #> 13: 2020-05-19 10:14:24 #> 14: 2020-05-19 10:14:24 #> 15: 2020-05-19 10:14:24 #> 16: 2020-05-19 10:14:24 #> 17: 2020-05-19 10:14:24 #> 18: 2020-05-19 10:14:24 #> 19: 2020-05-19 10:14:24 #> 20: 2020-05-19 10:14:24 #> 21: 2020-05-19 10:14:24 #> 22: 2020-05-19 10:14:24 #> 23: 2020-05-19 10:14:24 #> 24: 2020-05-19 10:14:24 #> 25: 2020-05-19 10:14:24 #> 26: 2020-05-19 10:14:24 #> 27: 2020-05-19 10:14:24 #> 28: 2020-05-19 10:14:24 #> 29: 2020-05-19 10:14:24 #> 30: 2020-05-19 10:14:24 #> 31: 2020-05-19 10:14:24 #> 32: 2020-05-19 10:14:24 #> 33: 2020-05-19 10:14:24 #> 34: 2020-05-19 10:14:24 #> 35: 2020-05-19 10:14:24 #> 36: 2020-05-19 10:14:24 #> 37: 2020-05-19 10:14:24 #> 38: 2020-05-19 10:14:24 #> 39: 2020-05-19 10:14:24 #> 40: 2020-05-19 10:14:24 #> 41: 2020-05-19 10:14:24 #> 42: 2020-05-19 10:14:24 #> 43: 2020-05-19 10:14:24 #> 44: 2020-05-19 10:14:24 #> 45: 2020-05-19 10:14:24 #> 46: 2020-05-19 10:14:24 #> 47: 2020-05-19 10:14:24 #> 48: 2020-05-19 10:14:24 #> 49: 2020-05-19 10:14:24 #> 50: 2020-05-19 10:14:24 #> 51: 2020-05-19 10:14:24 #> 52: 2020-05-19 10:14:24 #> 53: 2020-05-19 10:14:24 #> 54: 2020-05-19 10:14:24 #> 55: 2020-05-19 10:14:24 #> 56: 2020-05-19 10:14:24 #> 57: 2020-05-19 10:14:24 #> 58: 2020-05-19 10:14:24 #> 59: 2020-05-19 10:14:24 #> 60: 2020-05-19 10:14:24 #> 61: 2020-05-19 10:14:24 #> 62: 2020-05-19 10:14:24 #> 63: 2020-05-19 10:14:24 #> 64: 2020-05-19 10:14:24 #> 65: 2020-05-19 10:14:24 #> 66: 2020-05-19 10:14:24 #> 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 #> 1: f7bee22047b8d0c1 objectName a #> 2: f7bee22047b8d0c1 function rnorm #> 3: f7bee22047b8d0c1 class numeric #> 4: f7bee22047b8d0c1 object.size 1008 #> 5: f7bee22047b8d0c1 accessed 2020-05-19 10:14:24 #> 6: f7bee22047b8d0c1 inCloud FALSE #> 7: f7bee22047b8d0c1 resultHash #> 8: f7bee22047b8d0c1 elapsedTimeDigest 0.0005664825 secs #> 9: f7bee22047b8d0c1 elapsedTimeFirstRun 1.716614e-05 secs #> 10: f7bee22047b8d0c1 otherFunctions saveRDS #> 11: f7bee22047b8d0c1 otherFunctions do.call #> 12: f7bee22047b8d0c1 otherFunctions build_site_local #> 13: f7bee22047b8d0c1 otherFunctions build_reference #> 14: f7bee22047b8d0c1 otherFunctions data_reference_topic #> 15: f7bee22047b8d0c1 otherFunctions run_examples #> 16: f7bee22047b8d0c1 otherFunctions highlight_examples #> 17: f7bee22047b8d0c1 otherFunctions timing_fn #> 18: f7bee22047b8d0c1 otherFunctions handle #> 19: f7bee22047b8d0c1 otherFunctions try #> 20: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 #> 21: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 #> 22: f7bee22047b8d0c1 file.size 173 #> cacheId tagKey tagValue #> createdDate #> 1: 2020-05-19 10:14:24 #> 2: 2020-05-19 10:14:24 #> 3: 2020-05-19 10:14:24 #> 4: 2020-05-19 10:14:24 #> 5: 2020-05-19 10:14:24 #> 6: 2020-05-19 10:14:24 #> 7: 2020-05-19 10:14:24 #> 8: 2020-05-19 10:14:24 #> 9: 2020-05-19 10:14:24 #> 10: 2020-05-19 10:14:24 #> 11: 2020-05-19 10:14:24 #> 12: 2020-05-19 10:14:24 #> 13: 2020-05-19 10:14:24 #> 14: 2020-05-19 10:14:24 #> 15: 2020-05-19 10:14:24 #> 16: 2020-05-19 10:14:24 #> 17: 2020-05-19 10:14:24 #> 18: 2020-05-19 10:14:24 #> 19: 2020-05-19 10:14:24 #> 20: 2020-05-19 10:14:24 #> 21: 2020-05-19 10:14:24 #> 22: 2020-05-19 10:14:24 #> createdDate
# 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] 1.251884 #> 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.2503195 -1.7055817 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:3b347dee8f6305c7" #> attr(,"call") #> [1] ""
Cache(rnorm, 3, cacheRepo = tmpDir)
#> [1] -0.8554131 -0.1449016 -0.3244470 #> attr(,".Cache") #> attr(,".Cache")$newCache #> [1] TRUE #> #> attr(,"tags") #> [1] "cacheId:f0da91a44b839434" #> attr(,"call") #> [1] ""
Cache(rnorm, 4, cacheRepo = tmpDir)
#> [1] -0.17256490 -1.23606292 -1.90230421 -0.09450402 #> 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 #> 1: 7072c305d8c69df0 function rnorm #> 2: 7072c305d8c69df0 class numeric #> 3: 7072c305d8c69df0 object.size 984 #> 4: 7072c305d8c69df0 accessed 2020-05-19 10:14:25 #> 5: 7072c305d8c69df0 inCloud FALSE #> 6: 7072c305d8c69df0 resultHash #> 7: 7072c305d8c69df0 elapsedTimeDigest 0.0008497238 secs #> 8: 7072c305d8c69df0 elapsedTimeFirstRun 2.264977e-05 secs #> 9: 7072c305d8c69df0 otherFunctions saveRDS #> 10: 7072c305d8c69df0 otherFunctions do.call #> 11: 7072c305d8c69df0 otherFunctions build_site_local #> 12: 7072c305d8c69df0 otherFunctions build_reference #> 13: 7072c305d8c69df0 otherFunctions data_reference_topic #> 14: 7072c305d8c69df0 otherFunctions run_examples #> 15: 7072c305d8c69df0 otherFunctions highlight_examples #> 16: 7072c305d8c69df0 otherFunctions timing_fn #> 17: 7072c305d8c69df0 otherFunctions handle #> 18: 7072c305d8c69df0 otherFunctions try #> 19: 7072c305d8c69df0 preDigest n:853b1797f54b229c #> 20: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 #> 21: 7072c305d8c69df0 file.size 147 #> 22: 3b347dee8f6305c7 function rnorm #> 23: 3b347dee8f6305c7 class numeric #> 24: 3b347dee8f6305c7 object.size 992 #> 25: 3b347dee8f6305c7 accessed 2020-05-19 10:14:25 #> 26: 3b347dee8f6305c7 inCloud FALSE #> 27: 3b347dee8f6305c7 resultHash #> 28: 3b347dee8f6305c7 elapsedTimeDigest 0.0009016991 secs #> 29: 3b347dee8f6305c7 elapsedTimeFirstRun 1.93119e-05 secs #> 30: 3b347dee8f6305c7 otherFunctions saveRDS #> 31: 3b347dee8f6305c7 otherFunctions do.call #> 32: 3b347dee8f6305c7 otherFunctions build_site_local #> 33: 3b347dee8f6305c7 otherFunctions build_reference #> 34: 3b347dee8f6305c7 otherFunctions data_reference_topic #> 35: 3b347dee8f6305c7 otherFunctions run_examples #> 36: 3b347dee8f6305c7 otherFunctions highlight_examples #> 37: 3b347dee8f6305c7 otherFunctions timing_fn #> 38: 3b347dee8f6305c7 otherFunctions handle #> 39: 3b347dee8f6305c7 otherFunctions try #> 40: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a #> 41: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 #> 42: 3b347dee8f6305c7 file.size 157 #> 43: f0da91a44b839434 function rnorm #> 44: f0da91a44b839434 class numeric #> 45: f0da91a44b839434 object.size 1008 #> 46: f0da91a44b839434 accessed 2020-05-19 10:14:25 #> 47: f0da91a44b839434 inCloud FALSE #> 48: f0da91a44b839434 resultHash #> 49: f0da91a44b839434 elapsedTimeDigest 0.0005891323 secs #> 50: f0da91a44b839434 elapsedTimeFirstRun 1.788139e-05 secs #> 51: f0da91a44b839434 otherFunctions saveRDS #> 52: f0da91a44b839434 otherFunctions do.call #> 53: f0da91a44b839434 otherFunctions build_site_local #> 54: f0da91a44b839434 otherFunctions build_reference #> 55: f0da91a44b839434 otherFunctions data_reference_topic #> 56: f0da91a44b839434 otherFunctions run_examples #> 57: f0da91a44b839434 otherFunctions highlight_examples #> 58: f0da91a44b839434 otherFunctions timing_fn #> 59: f0da91a44b839434 otherFunctions handle #> 60: f0da91a44b839434 otherFunctions try #> 61: f0da91a44b839434 preDigest n:7f12988bd88a0fb8 #> 62: f0da91a44b839434 preDigest .FUN:4f604aa46882b368 #> 63: f0da91a44b839434 file.size 165 #> 64: f7bee22047b8d0c1 function rnorm #> 65: f7bee22047b8d0c1 class numeric #> 66: f7bee22047b8d0c1 object.size 1008 #> 67: f7bee22047b8d0c1 accessed 2020-05-19 10:14:25 #> 68: f7bee22047b8d0c1 inCloud FALSE #> 69: f7bee22047b8d0c1 resultHash #> 70: f7bee22047b8d0c1 elapsedTimeDigest 0.0005803108 secs #> 71: f7bee22047b8d0c1 elapsedTimeFirstRun 2.026558e-05 secs #> 72: f7bee22047b8d0c1 otherFunctions saveRDS #> 73: f7bee22047b8d0c1 otherFunctions do.call #> 74: f7bee22047b8d0c1 otherFunctions build_site_local #> 75: f7bee22047b8d0c1 otherFunctions build_reference #> 76: f7bee22047b8d0c1 otherFunctions data_reference_topic #> 77: f7bee22047b8d0c1 otherFunctions run_examples #> 78: f7bee22047b8d0c1 otherFunctions highlight_examples #> 79: f7bee22047b8d0c1 otherFunctions timing_fn #> 80: f7bee22047b8d0c1 otherFunctions handle #> 81: f7bee22047b8d0c1 otherFunctions try #> 82: f7bee22047b8d0c1 preDigest n:7eef4eae85fd9229 #> 83: f7bee22047b8d0c1 preDigest .FUN:4f604aa46882b368 #> 84: f7bee22047b8d0c1 file.size 174 #> cacheId tagKey tagValue #> createdDate #> 1: 2020-05-19 10:14:25 #> 2: 2020-05-19 10:14:25 #> 3: 2020-05-19 10:14:25 #> 4: 2020-05-19 10:14:25 #> 5: 2020-05-19 10:14:25 #> 6: 2020-05-19 10:14:25 #> 7: 2020-05-19 10:14:25 #> 8: 2020-05-19 10:14:25 #> 9: 2020-05-19 10:14:25 #> 10: 2020-05-19 10:14:25 #> 11: 2020-05-19 10:14:25 #> 12: 2020-05-19 10:14:25 #> 13: 2020-05-19 10:14:25 #> 14: 2020-05-19 10:14:25 #> 15: 2020-05-19 10:14:25 #> 16: 2020-05-19 10:14:25 #> 17: 2020-05-19 10:14:25 #> 18: 2020-05-19 10:14:25 #> 19: 2020-05-19 10:14:25 #> 20: 2020-05-19 10:14:25 #> 21: 2020-05-19 10:14:25 #> 22: 2020-05-19 10:14:25 #> 23: 2020-05-19 10:14:25 #> 24: 2020-05-19 10:14:25 #> 25: 2020-05-19 10:14:25 #> 26: 2020-05-19 10:14:25 #> 27: 2020-05-19 10:14:25 #> 28: 2020-05-19 10:14:25 #> 29: 2020-05-19 10:14:25 #> 30: 2020-05-19 10:14:25 #> 31: 2020-05-19 10:14:25 #> 32: 2020-05-19 10:14:25 #> 33: 2020-05-19 10:14:25 #> 34: 2020-05-19 10:14:25 #> 35: 2020-05-19 10:14:25 #> 36: 2020-05-19 10:14:25 #> 37: 2020-05-19 10:14:25 #> 38: 2020-05-19 10:14:25 #> 39: 2020-05-19 10:14:25 #> 40: 2020-05-19 10:14:25 #> 41: 2020-05-19 10:14:25 #> 42: 2020-05-19 10:14:25 #> 43: 2020-05-19 10:14:25 #> 44: 2020-05-19 10:14:25 #> 45: 2020-05-19 10:14:25 #> 46: 2020-05-19 10:14:25 #> 47: 2020-05-19 10:14:25 #> 48: 2020-05-19 10:14:25 #> 49: 2020-05-19 10:14:25 #> 50: 2020-05-19 10:14:25 #> 51: 2020-05-19 10:14:25 #> 52: 2020-05-19 10:14:25 #> 53: 2020-05-19 10:14:25 #> 54: 2020-05-19 10:14:25 #> 55: 2020-05-19 10:14:25 #> 56: 2020-05-19 10:14:25 #> 57: 2020-05-19 10:14:25 #> 58: 2020-05-19 10:14:25 #> 59: 2020-05-19 10:14:25 #> 60: 2020-05-19 10:14:25 #> 61: 2020-05-19 10:14:25 #> 62: 2020-05-19 10:14:25 #> 63: 2020-05-19 10:14:25 #> 64: 2020-05-19 10:14:25 #> 65: 2020-05-19 10:14:25 #> 66: 2020-05-19 10:14:25 #> 67: 2020-05-19 10:14:25 #> 68: 2020-05-19 10:14:25 #> 69: 2020-05-19 10:14:25 #> 70: 2020-05-19 10:14:25 #> 71: 2020-05-19 10:14:25 #> 72: 2020-05-19 10:14:25 #> 73: 2020-05-19 10:14:25 #> 74: 2020-05-19 10:14:25 #> 75: 2020-05-19 10:14:25 #> 76: 2020-05-19 10:14:25 #> 77: 2020-05-19 10:14:25 #> 78: 2020-05-19 10:14:25 #> 79: 2020-05-19 10:14:25 #> 80: 2020-05-19 10:14:25 #> 81: 2020-05-19 10:14:25 #> 82: 2020-05-19 10:14:25 #> 83: 2020-05-19 10:14:25 #> 84: 2020-05-19 10:14:25 #> 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 #> 1: 7072c305d8c69df0 function rnorm #> 2: 7072c305d8c69df0 class numeric #> 3: 7072c305d8c69df0 object.size 984 #> 4: 7072c305d8c69df0 accessed 2020-05-19 10:14:25 #> 5: 7072c305d8c69df0 inCloud FALSE #> 6: 7072c305d8c69df0 resultHash #> 7: 7072c305d8c69df0 elapsedTimeDigest 0.0008497238 secs #> 8: 7072c305d8c69df0 elapsedTimeFirstRun 2.264977e-05 secs #> 9: 7072c305d8c69df0 otherFunctions saveRDS #> 10: 7072c305d8c69df0 otherFunctions do.call #> 11: 7072c305d8c69df0 otherFunctions build_site_local #> 12: 7072c305d8c69df0 otherFunctions build_reference #> 13: 7072c305d8c69df0 otherFunctions data_reference_topic #> 14: 7072c305d8c69df0 otherFunctions run_examples #> 15: 7072c305d8c69df0 otherFunctions highlight_examples #> 16: 7072c305d8c69df0 otherFunctions timing_fn #> 17: 7072c305d8c69df0 otherFunctions handle #> 18: 7072c305d8c69df0 otherFunctions try #> 19: 7072c305d8c69df0 preDigest n:853b1797f54b229c #> 20: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 #> 21: 7072c305d8c69df0 file.size 147 #> 22: 3b347dee8f6305c7 function rnorm #> 23: 3b347dee8f6305c7 class numeric #> 24: 3b347dee8f6305c7 object.size 992 #> 25: 3b347dee8f6305c7 accessed 2020-05-19 10:14:25 #> 26: 3b347dee8f6305c7 inCloud FALSE #> 27: 3b347dee8f6305c7 resultHash #> 28: 3b347dee8f6305c7 elapsedTimeDigest 0.0009016991 secs #> 29: 3b347dee8f6305c7 elapsedTimeFirstRun 1.93119e-05 secs #> 30: 3b347dee8f6305c7 otherFunctions saveRDS #> 31: 3b347dee8f6305c7 otherFunctions do.call #> 32: 3b347dee8f6305c7 otherFunctions build_site_local #> 33: 3b347dee8f6305c7 otherFunctions build_reference #> 34: 3b347dee8f6305c7 otherFunctions data_reference_topic #> 35: 3b347dee8f6305c7 otherFunctions run_examples #> 36: 3b347dee8f6305c7 otherFunctions highlight_examples #> 37: 3b347dee8f6305c7 otherFunctions timing_fn #> 38: 3b347dee8f6305c7 otherFunctions handle #> 39: 3b347dee8f6305c7 otherFunctions try #> 40: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a #> 41: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 #> 42: 3b347dee8f6305c7 file.size 157 #> 43: f0da91a44b839434 function rnorm #> 44: f0da91a44b839434 class numeric #> 45: f0da91a44b839434 object.size 1008 #> 46: f0da91a44b839434 accessed 2020-05-19 10:14:25 #> 47: f0da91a44b839434 inCloud FALSE #> 48: f0da91a44b839434 resultHash #> 49: f0da91a44b839434 elapsedTimeDigest 0.0005891323 secs #> 50: f0da91a44b839434 elapsedTimeFirstRun 1.788139e-05 secs #> 51: f0da91a44b839434 otherFunctions saveRDS #> 52: f0da91a44b839434 otherFunctions do.call #> 53: f0da91a44b839434 otherFunctions build_site_local #> 54: f0da91a44b839434 otherFunctions build_reference #> 55: f0da91a44b839434 otherFunctions data_reference_topic #> 56: f0da91a44b839434 otherFunctions run_examples #> 57: f0da91a44b839434 otherFunctions highlight_examples #> 58: f0da91a44b839434 otherFunctions timing_fn #> 59: f0da91a44b839434 otherFunctions handle #> 60: f0da91a44b839434 otherFunctions try #> 61: f0da91a44b839434 preDigest n:7f12988bd88a0fb8 #> 62: f0da91a44b839434 preDigest .FUN:4f604aa46882b368 #> 63: f0da91a44b839434 file.size 165 #> cacheId tagKey tagValue #> createdDate #> 1: 2020-05-19 10:14:25 #> 2: 2020-05-19 10:14:25 #> 3: 2020-05-19 10:14:25 #> 4: 2020-05-19 10:14:25 #> 5: 2020-05-19 10:14:25 #> 6: 2020-05-19 10:14:25 #> 7: 2020-05-19 10:14:25 #> 8: 2020-05-19 10:14:25 #> 9: 2020-05-19 10:14:25 #> 10: 2020-05-19 10:14:25 #> 11: 2020-05-19 10:14:25 #> 12: 2020-05-19 10:14:25 #> 13: 2020-05-19 10:14:25 #> 14: 2020-05-19 10:14:25 #> 15: 2020-05-19 10:14:25 #> 16: 2020-05-19 10:14:25 #> 17: 2020-05-19 10:14:25 #> 18: 2020-05-19 10:14:25 #> 19: 2020-05-19 10:14:25 #> 20: 2020-05-19 10:14:25 #> 21: 2020-05-19 10:14:25 #> 22: 2020-05-19 10:14:25 #> 23: 2020-05-19 10:14:25 #> 24: 2020-05-19 10:14:25 #> 25: 2020-05-19 10:14:25 #> 26: 2020-05-19 10:14:25 #> 27: 2020-05-19 10:14:25 #> 28: 2020-05-19 10:14:25 #> 29: 2020-05-19 10:14:25 #> 30: 2020-05-19 10:14:25 #> 31: 2020-05-19 10:14:25 #> 32: 2020-05-19 10:14:25 #> 33: 2020-05-19 10:14:25 #> 34: 2020-05-19 10:14:25 #> 35: 2020-05-19 10:14:25 #> 36: 2020-05-19 10:14:25 #> 37: 2020-05-19 10:14:25 #> 38: 2020-05-19 10:14:25 #> 39: 2020-05-19 10:14:25 #> 40: 2020-05-19 10:14:25 #> 41: 2020-05-19 10:14:25 #> 42: 2020-05-19 10:14:25 #> 43: 2020-05-19 10:14:25 #> 44: 2020-05-19 10:14:25 #> 45: 2020-05-19 10:14:25 #> 46: 2020-05-19 10:14:25 #> 47: 2020-05-19 10:14:25 #> 48: 2020-05-19 10:14:25 #> 49: 2020-05-19 10:14:25 #> 50: 2020-05-19 10:14:25 #> 51: 2020-05-19 10:14:25 #> 52: 2020-05-19 10:14:25 #> 53: 2020-05-19 10:14:25 #> 54: 2020-05-19 10:14:25 #> 55: 2020-05-19 10:14:25 #> 56: 2020-05-19 10:14:25 #> 57: 2020-05-19 10:14:25 #> 58: 2020-05-19 10:14:25 #> 59: 2020-05-19 10:14:25 #> 60: 2020-05-19 10:14:25 #> 61: 2020-05-19 10:14:25 #> 62: 2020-05-19 10:14:25 #> 63: 2020-05-19 10:14:25 #> createdDate
cc(thisTime, ask = FALSE, x = tmpDir)
#> Cache size:
#> Total (including Rasters): 0 bytes
#> Selected objects (not including Rasters): 0 bytes
showCache(x = tmpDir) # all those after thisTime gone, i.e., only 1 left
#> Cache size:
#> Total (including Rasters): 746 bytes
#> Selected objects (not including Rasters): 746 bytes
#> cacheId tagKey tagValue #> 1: 7072c305d8c69df0 function rnorm #> 2: 7072c305d8c69df0 class numeric #> 3: 7072c305d8c69df0 object.size 984 #> 4: 7072c305d8c69df0 accessed 2020-05-19 10:14:25 #> 5: 7072c305d8c69df0 inCloud FALSE #> 6: 7072c305d8c69df0 resultHash #> 7: 7072c305d8c69df0 elapsedTimeDigest 0.0008497238 secs #> 8: 7072c305d8c69df0 elapsedTimeFirstRun 2.264977e-05 secs #> 9: 7072c305d8c69df0 otherFunctions saveRDS #> 10: 7072c305d8c69df0 otherFunctions do.call #> 11: 7072c305d8c69df0 otherFunctions build_site_local #> 12: 7072c305d8c69df0 otherFunctions build_reference #> 13: 7072c305d8c69df0 otherFunctions data_reference_topic #> 14: 7072c305d8c69df0 otherFunctions run_examples #> 15: 7072c305d8c69df0 otherFunctions highlight_examples #> 16: 7072c305d8c69df0 otherFunctions timing_fn #> 17: 7072c305d8c69df0 otherFunctions handle #> 18: 7072c305d8c69df0 otherFunctions try #> 19: 7072c305d8c69df0 preDigest n:853b1797f54b229c #> 20: 7072c305d8c69df0 preDigest .FUN:4f604aa46882b368 #> 21: 7072c305d8c69df0 file.size 147 #> 22: 3b347dee8f6305c7 function rnorm #> 23: 3b347dee8f6305c7 class numeric #> 24: 3b347dee8f6305c7 object.size 992 #> 25: 3b347dee8f6305c7 accessed 2020-05-19 10:14:25 #> 26: 3b347dee8f6305c7 inCloud FALSE #> 27: 3b347dee8f6305c7 resultHash #> 28: 3b347dee8f6305c7 elapsedTimeDigest 0.0009016991 secs #> 29: 3b347dee8f6305c7 elapsedTimeFirstRun 1.93119e-05 secs #> 30: 3b347dee8f6305c7 otherFunctions saveRDS #> 31: 3b347dee8f6305c7 otherFunctions do.call #> 32: 3b347dee8f6305c7 otherFunctions build_site_local #> 33: 3b347dee8f6305c7 otherFunctions build_reference #> 34: 3b347dee8f6305c7 otherFunctions data_reference_topic #> 35: 3b347dee8f6305c7 otherFunctions run_examples #> 36: 3b347dee8f6305c7 otherFunctions highlight_examples #> 37: 3b347dee8f6305c7 otherFunctions timing_fn #> 38: 3b347dee8f6305c7 otherFunctions handle #> 39: 3b347dee8f6305c7 otherFunctions try #> 40: 3b347dee8f6305c7 preDigest n:82dc709f2b91918a #> 41: 3b347dee8f6305c7 preDigest .FUN:4f604aa46882b368 #> 42: 3b347dee8f6305c7 file.size 157 #> 43: f0da91a44b839434 function rnorm #> 44: f0da91a44b839434 class numeric #> 45: f0da91a44b839434 object.size 1008 #> 46: f0da91a44b839434 accessed 2020-05-19 10:14:25 #> 47: f0da91a44b839434 inCloud FALSE #> 48: f0da91a44b839434 resultHash #> 49: f0da91a44b839434 elapsedTimeDigest 0.0005891323 secs #> 50: f0da91a44b839434 elapsedTimeFirstRun 1.788139e-05 secs #> 51: f0da91a44b839434 otherFunctions saveRDS #> 52: f0da91a44b839434 otherFunctions do.call #> 53: f0da91a44b839434 otherFunctions build_site_local #> 54: f0da91a44b839434 otherFunctions build_reference #> 55: f0da91a44b839434 otherFunctions data_reference_topic #> 56: f0da91a44b839434 otherFunctions run_examples #> 57: f0da91a44b839434 otherFunctions highlight_examples #> 58: f0da91a44b839434 otherFunctions timing_fn #> 59: f0da91a44b839434 otherFunctions handle #> 60: f0da91a44b839434 otherFunctions try #> 61: f0da91a44b839434 preDigest n:7f12988bd88a0fb8 #> 62: f0da91a44b839434 preDigest .FUN:4f604aa46882b368 #> 63: f0da91a44b839434 file.size 165 #> cacheId tagKey tagValue #> createdDate #> 1: 2020-05-19 10:14:25 #> 2: 2020-05-19 10:14:25 #> 3: 2020-05-19 10:14:25 #> 4: 2020-05-19 10:14:25 #> 5: 2020-05-19 10:14:25 #> 6: 2020-05-19 10:14:25 #> 7: 2020-05-19 10:14:25 #> 8: 2020-05-19 10:14:25 #> 9: 2020-05-19 10:14:25 #> 10: 2020-05-19 10:14:25 #> 11: 2020-05-19 10:14:25 #> 12: 2020-05-19 10:14:25 #> 13: 2020-05-19 10:14:25 #> 14: 2020-05-19 10:14:25 #> 15: 2020-05-19 10:14:25 #> 16: 2020-05-19 10:14:25 #> 17: 2020-05-19 10:14:25 #> 18: 2020-05-19 10:14:25 #> 19: 2020-05-19 10:14:25 #> 20: 2020-05-19 10:14:25 #> 21: 2020-05-19 10:14:25 #> 22: 2020-05-19 10:14:25 #> 23: 2020-05-19 10:14:25 #> 24: 2020-05-19 10:14:25 #> 25: 2020-05-19 10:14:25 #> 26: 2020-05-19 10:14:25 #> 27: 2020-05-19 10:14:25 #> 28: 2020-05-19 10:14:25 #> 29: 2020-05-19 10:14:25 #> 30: 2020-05-19 10:14:25 #> 31: 2020-05-19 10:14:25 #> 32: 2020-05-19 10:14:25 #> 33: 2020-05-19 10:14:25 #> 34: 2020-05-19 10:14:25 #> 35: 2020-05-19 10:14:25 #> 36: 2020-05-19 10:14:25 #> 37: 2020-05-19 10:14:25 #> 38: 2020-05-19 10:14:25 #> 39: 2020-05-19 10:14:25 #> 40: 2020-05-19 10:14:25 #> 41: 2020-05-19 10:14:25 #> 42: 2020-05-19 10:14:25 #> 43: 2020-05-19 10:14:25 #> 44: 2020-05-19 10:14:25 #> 45: 2020-05-19 10:14:25 #> 46: 2020-05-19 10:14:25 #> 47: 2020-05-19 10:14:25 #> 48: 2020-05-19 10:14:25 #> 49: 2020-05-19 10:14:25 #> 50: 2020-05-19 10:14:25 #> 51: 2020-05-19 10:14:25 #> 52: 2020-05-19 10:14:25 #> 53: 2020-05-19 10:14:25 #> 54: 2020-05-19 10:14:25 #> 55: 2020-05-19 10:14:25 #> 56: 2020-05-19 10:14:25 #> 57: 2020-05-19 10:14:25 #> 58: 2020-05-19 10:14:25 #> 59: 2020-05-19 10:14:25 #> 60: 2020-05-19 10:14:25 #> 61: 2020-05-19 10:14:25 #> 62: 2020-05-19 10:14:25 #> 63: 2020-05-19 10:14:25 #> createdDate
cc(ask = FALSE, x = tmpDir) # Cache is
#> 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
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): 248 bytes
#> Selected objects (not including Rasters): 248 bytes