Problem Statement
In a pipeline, when should you use a cache instead of artifacts?
Explanation
Use a cache to reuse things like npm or Maven downloads and avoid repeated network work. Use artifacts to pass built outputs between stages.
This split keeps runs fast and results reproducible.
Code Solution
SolutionRead Only
cache: paths: - ~/.m2/repository - node_modules
