Interview Prep/CI/CD/Metrics, Performance and Cost

How do you handle build cache invalidation problems ("works after clearing cache")?

IntermediateProductionMetrics, Performance and Cost
Answer

Make cache keys reflect all inputs: lockfile hash, tool version, OS and architecture, and a manual version prefix you can bump (v2-). Do not cache outputs that depend on things outside the key (generated files from env vars). When a bad cache is suspected, bump the prefix to start fresh instead of manually deleting. Periodically run a no-cache build (nightly) to detect correctness drift.

All CI/CD questions

More on Metrics, Performance and Cost