sourcoise_priority: Change Priority of Cached Files

View source: R/change.R

sourcoise_priorityR Documentation

Change Priority of Cached Files

Description

Updates the priority metadata for cached files associated with a given path. Only affects cache entries where the priority differs from the specified value.

Usage

sourcoise_priority(path, priority = 10, root = getOption("sourcoise.root"))

Arguments

path

Character string specifying the file path whose cache metadata should be updated.

priority

Numeric priority value to set. Default is 10. Lower values indicate higher priority.

root

Character string specifying the root directory for the cache. Defaults to getOption("sourcoise.root").

Details

The function locates all cache entries for the specified path, filters to the most recent entry for each argument hash, and updates the priority metadata only for entries where the current priority differs from the specified value.

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.

Examples

## Not run: 
# Set priority to 5 for cached results of a script
sourcoise_priority("scripts/analysis.R", priority = 5)

# Use default priority of 10
sourcoise_priority("scripts/model.R")

## End(Not run)

sourcoise documentation built on Jan. 8, 2026, 1:07 a.m.