Cache Management
Stemix CI caches common toolchains to keep validation fast while still degrading safely when cache servers are slow or unavailable.
What we cache
- Tooling bootstrap:
~/.proto, moon caches. - Node.js: repo-local
.pnpm-storekeyed by the rootpnpm-lock.yaml. - Backstage Yarn workspace:
tools/backstage/node_modulesand the local Yarn cache are rebuilt on demand fromtools/backstage/yarn.lock. - Go:
~/go/pkg/mod,~/.cache/go-buildkeyed by.prototoolsand the Go module files instacks/go/net-http/rest/. - Python (uv/pip):
~/.cache/uv,~/.cache/pipkeyed by.prototoolsandscripts/ci/check-privacy.sh. - Maven:
~/.m2/repository,~/.m2/wrapperkeyed bytools/mock-oauthMaven wrapper metadata. - Docker Buildx:
ghacaches with unique scopes per image (go-net-http-rest-web,go-net-http-rest-bff,nodejs-react-fastify-rest-web,nodejs-react-fastify-rest-bff,contract-tests,mcp-tools,mock-oauth) withignore-error=trueandtimeout=10m.
What we do not cache
- Build artifacts and node_modules are rebuilt per run.
- Cache steps run with
continue-on-error: trueandSEGMENT_DOWNLOAD_TIMEOUT_MINS=3so cache outages fall back to cache misses instead of failing jobs.
Manual cache cleanup
Use the Cache Cleanup workflow (.github/workflows/cache-cleanup.yml) when you need to remove stale GitHub Actions caches.
Inputs:
cache_idorcache_key— delete a single cache.delete_all— delete every cache (requiresconfirm_all: true).ref— limit operations to a ref.succeed_on_no_caches— letdelete_allexit 0 when nothing is found.
All deletions run through scripts/ci/gh-cache-delete.sh, which prints the exact gh cache delete command and lists caches before and after. When using delete_all, always set confirm_all: true to opt in explicitly to destructive cleanup.