The cache command fetches all issues and PRs (with comments) from GitHub via GraphQL, writing each as a separate JSON file.
Cache metadata tracks the last fetch timestamp and configured duration.
Delta fetches use the since parameter on issues and client-side timestamp comparison on PRs to only fetch updated items.
Architecture
cache command ──► runCache()
│
├─ Fresh & not forced? ──Yes──► Print "still fresh", exit
│
└─ Stale or forced
│
├─ Determine delta cutoff (previous cache timestamp)
│
├─ FetchAllIssues(owner, repo, since)
│ └─ Save each issue to issues/<number>.json
│
├─ FetchAllPRs(owner, repo, since)
│ └─ Save each PR to prs/<number>.json
│
└─ SaveCacheInfo(duration)