AZ-400 Exam QuestionsBrowse all questions from this exam

AZ-400 Exam - Question 463


HOTSPOT

-

You have an Azure subscription that contains Azure DevOps build pipelines.

You need to implement pipeline caching by using the cache task.

How should you complete the YAML definition? To answer, select the appropriate options in the answer area.

NOTE: Each correct selection is worth one point.

Show Answer
Correct Answer:

Discussion

3 comments
Sign in to comment
Asryi
Jan 16, 2024

Given answer is correct https://learn.microsoft.com/en-us/azure/devops/pipelines/release/caching?view=azure-devops

Alandt
Jan 15, 2024

variables: yarn_cache_folder: $(Pipeline.Workspace)/.yarn steps: - task: Cache@2 inputs: key: 'yarn | "$(Agent.OS)" | yarn.lock' path: $(yarn_cache_folder) displayName: Cache yarn packages - script: yarn --frozen-lockfile

60ties
Jul 16, 2024

Correct. see syntax: https://learn.microsoft.com/en-us/azure/devops/pipelines/tasks/reference/cache-v2?view=azure-pipelines#syntax