GITHUB-ACTIONS · Question #6
As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (C
The correct answer is A. Use caching when reusing files that change rarely between jobs or workflow runs. B. Use artifacts when referencing files produced by a job after a workflow has ended.. Caching is ideal for files that change rarely, such as dependencies or build outputs, as it speeds up subsequent workflow runs by reusing previously cached files instead of re-downloading or rebuilding them. Artifacts are used for persisting files produced during a job that need
Question
As a developer, you are optimizing a GitHub workflow that uses and produces many different files. You need to determine when to use caching versus workflow artifacts. Which two statements are true? (Choose two.)
Options
- AUse caching when reusing files that change rarely between jobs or workflow runs.
- BUse artifacts when referencing files produced by a job after a workflow has ended.
- CUse caching to store cache entries for up to 30 days between accesses.
- DUse artifacts to access the GitHub Package Registry and download a package for a workflow
How the community answered
(35 responses)- A80% (28)
- C6% (2)
- D14% (5)
Explanation
Caching is ideal for files that change rarely, such as dependencies or build outputs, as it speeds up subsequent workflow runs by reusing previously cached files instead of re-downloading or rebuilding them. Artifacts are used for persisting files produced during a job that need to be used in later jobs or after the workflow has ended, allowing them to be downloaded or referenced later.
Topics
Community Discussion
No community discussion yet for this question.