| sourcoise_lapse | R Documentation |
Updates the lapse policy metadata for cached files associated with a given path. The lapse policy determines when cached results should expire.
sourcoise_lapse(path, lapse = "never", root = getOption("sourcoise.root"))
path |
Character string specifying the file path whose cache metadata should be updated. |
lapse |
Character string specifying the lapse policy. Default is "never". Common values include "never", "daily", "weekly", or custom time periods. |
root |
Character string specifying the root directory for the cache.
Defaults to |
The function locates all cache entries for the specified path, filters to the most recent entry for each argument hash, and updates the lapse policy metadata only for entries where the current lapse value differs from the specified value.
Invisibly returns the results of writing metadata for each updated cache entry. Returns a message string if no files are found or no changes are needed.
## Not run:
# Set cache to expire daily
sourcoise_lapse("scripts/analysis.R", lapse = "daily")
# Set cache to never expire (default)
sourcoise_lapse("scripts/model.R", lapse = "never")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.