deckctl cache
Handles cache lifecycle. Only GitLab-backed templates are cached; local sources are read directly from disk.
Synopsis
Section titled “Synopsis”deckctl cache [command] [flags]| Subcommand | Purpose |
|---|---|
list | List cache entries |
clear | Remove cache entries |
All subcommands also accept the global flags,
notably --cache-dir.
deckctl cache list
Section titled “deckctl cache list”deckctl cache list [flags]No command-specific flags.
Table columns:
| Column | Meaning |
|---|---|
Source | Source name from config.yaml |
Template | Template name (the GitLab project slug) |
SHA | The cached ref — a tag or branch name. Not necessarily a commit SHA. |
Size | Total bytes on disk, human-readable |
Age | Time since the entry was last verified against the server |
deckctl cache listdeckctl cache list -o jsondeckctl cache list --cache-dir /tmp/deckctl-cache-o json includes the full metadata: source, template, sha,
fetched_at, last_checked, etag, source_url, plus the entry’s size and
path.
deckctl cache clear
Section titled “deckctl cache clear”deckctl cache clear [flags]| Flag | Default | Description |
|---|---|---|
--source <name> | — | Only entries from this source |
--template <name> | — | Only entries for this template name |
--older-than <dur> | — | Only entries whose last check is older than this |
--auto-approve | false | Skip the confirmation prompt |
Filters compose with AND — an entry must match every active filter to be removed. With no filters, everything is removed.
--older-than takes a number plus a single unit: s, m, h, d, w.
Decimals are accepted (0.5h). It is compared against last_checked, not
fetched_at.
# Everything, with a confirmation promptdeckctl cache clear
# One sourcedeckctl cache clear --source work
# One template across all sourcesdeckctl cache clear --template go-service
# Anything not verified in the last weekdeckctl cache clear --older-than 1w
# Combined, non-interactivedeckctl cache clear --source work --older-than 30d --auto-approveDeleting the cache directory manually with rm -rf is equally safe — deckctl
rebuilds what it needs on the next apply.