[B] Use caching when you want to reuse files that don't change often between jobs or workflow runs, such as build dependencies from a package management system.
[D] Use artifacts when you want to save files produced by a job to view after a workflow run has ended, such as built binaries or build logs.
Reference:
https://docs.github.com/en/
[email protected]/actions/tutorials/store-and-share-data