| clear_cache | R Documentation |
Removes score-cache files under a project's cache directory. Use
this when a model returned garbage during a ranking run and you
want to re-score with fresh calls; the cache would otherwise be
hit on the next rank_records() invocation.
clear_cache(project, model = NULL, delete_ranked = TRUE)
project |
Project name. |
model |
Optional Ollama tag. When |
delete_ranked |
If |
By default clears every cached score (the most conservative
"start over" behaviour). Pass model = "..." to clear only that
model's cached scores across all records / replicates. Optionally
also deletes the persisted ranked artefact (delete_ranked = TRUE)
so a stale ranking doesn't linger.
Invisibly, the number of cache files removed.
# Operate against a throwaway data directory so the example never
# touches your real projects.
withr::with_envvar(c(R_USER_DATA_DIR = tempfile("screenllm-")), {
# Clear one model's cached scores (a no-op on an empty project):
clear_cache("demo-project", model = "mistral:7b")
# Clear everything for the project:
clear_cache("demo-project")
})
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.