You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The disk cache (`~/.cache/splashboard/`) is opaque to users today. For debugging ("why is my widget showing stale data?"), force-refresh ("blow away this widget's cache"), and housekeeping ("how much disk is this eating?"), they need a CLI.
Proposal
`splashboard cache list` — print each cache entry: key, widget id (if resolvable), age, TTL, fresh/stale, payload size. Sort by age descending.
`splashboard cache clear` — remove all cache entries. Confirm first unless `--yes`.
`splashboard cache clear <widget_id>` — remove a single widget's entry.
`splashboard cache path` — print the resolved cache directory. Useful for `rm -rf $(splashboard cache path)` or for docs.
Open questions
Key ↔ widget mapping: cache keys are `name-` (name + format). The widget id isn't stored in the cache entry. Options:
Accept it — `clear <widget_id>` takes the current config and computes the key, so it only works if the widget is still configured.
Stash the widget_id alongside the entry on write (tiny schema bump).
First pass: option 1. It solves the 95% case and keeps the cache format unchanged.
Output format: same story as `splashboard fetch` — human default, `--json` for scripting.
Stale lock files: should `cache list` also show `.lock` files, and should `cache clear` remove them? Probably yes; treat them as auxiliary files.
Non-goals
Manual edits to cache entries. If you need that, you probably want a ReadStore widget instead (`#`).
splashboard cache clear <widget_id> — compute the cache key from current config + remove that single entry
Per your open question, going with option 1 for widget_id mapping (compute key from current config, only works if widget is still configured) — keeps the cache format unchanged. Human-readable output by default; --json flag for scripting.
Activity
satyakwok commentedon May 11, 2026
Taking this.
Plan: add a
cachesubcommand alongsidefetch-onlyin the CLI dispatcher. Subcommands:splashboard cache path— print resolved cache dirsplashboard cache list— iterate cache dir, print key / age / size / TTL / fresh-stale, sort by age desc; include.lockfiles as auxiliarysplashboard cache clear— remove all cache entries (and lock files); confirm prompt unless--yessplashboard cache clear <widget_id>— compute the cache key from current config + remove that single entryPer your open question, going with option 1 for widget_id mapping (compute key from current config, only works if widget is still configured) — keeps the cache format unchanged. Human-readable output by default;
--jsonflag for scripting.→ PR opened: #
feat: "splashboard cache" management CLI — list, clear, path (#40)
Merge pull request #216 from satyakwok/feat-cache-cli-40