nerdexam
GitHub

GITHUB-ACTIONS · Question #29

As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which in

The correct answer is B. key: the key created when saving a cache and the key used to search for a cache D. path: the file path on the runner to cache or restore. The key is required because it uniquely identifies the cache. It is used to store and retrieve cached data. When creating or restoring a cache, you need to define a key that will be used to identify the cache. The path is the file path on the runner that you want to cache. This i

Manage dependencies and caching

Question

As a developer, your Actions workflow often reuses the same outputs or downloaded dependencies from one run to another. To cache dependencies for a job, you are using the GitHub cache action. Which input parameters are required for this action? (Choose two.)

Options

  • Adependency: the name and version of a package to cache or restore
  • Bkey: the key created when saving a cache and the key used to search for a cache
  • Ccache-hit: the copy action key used with restore parameter to restore the data from the cache
  • Dpath: the file path on the runner to cache or restore
  • Eref: the ref name of the branch to access and restore a cache created
  • Frestore-keys: the copy action key used with cache parameter to cache the data

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    87% (34)
  • E
    8% (3)
  • F
    3% (1)

Explanation

The key is required because it uniquely identifies the cache. It is used to store and retrieve cached data. When creating or restoring a cache, you need to define a key that will be used to identify the cache. The path is the file path on the runner that you want to cache. This is where the cached files or dependencies are located and should be specified to tell GitHub where to store or retrieve the

Topics

#caching dependencies#cache action#cache key#cache path

Community Discussion

No community discussion yet for this question.

Full GITHUB-ACTIONS Practice