Skip to content

cache

Recipe card from the charly-cache plugin (Commands — runtime CLI verbs).

charly cache — the git-ref cache operator surface

Section titled “charly cache — the git-ref cache operator surface”

charly cache manages the git-ref cache: the store of resolved @github refs charly keeps so repeated resolutions do not re-fetch. It is served by candy/plugin-cache (a command:cache plugin, dual-placement compiled-in + external).

  • charly cache status — the cache file path + entry count.
  • charly cache clear — drop every cached git answer; the next resolutions are fresh.
  • charly cache refresh — drop the cache and note the next resolution re-warms the refs.
  • charly cache bypass — persist the bypass; every resolution is fresh until turned off.
  • charly cache bypass --off — turn the bypass off; the cache resumes.

The cache is the cache: section of the per-host charly.yml (~/.config/charly/charly.yml) — shared on-disk state. The plugin operates on it DIRECTLY through spec/refs, so a plugin process reads and writes the SAME cache the core singleton uses. The bypass is persisted in the cache’s git: section via refs.GitClient.SetBypass, so a fresh core process honors it at construction.

Reach for charly cache status first when a @github resolution looks stale; use charly cache clear/refresh to force fresh resolution, and bypass when every resolution must hit the network (e.g. debugging a remote branch that advanced).