Google PCA Practice Question: Analyze and optimize technical and business processes
A team uses Cloud Build for CI/CD. The builds are taking longer than expected due to dependency downloads. What is the best practice to speed up builds?
⚠ Common exam trap
A common mix-up: candidates confuse increasing compute resources (Option A) with solving a network-bound problem, or they mistakenly think storing dependencies in a repository (Options C and D) eliminates the need to download them, when in fact only layer caching avoids re-downloading by reusing previously built layers.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Use Docker layer caching with Cloud Build by specifying a cache image or using Kaniko cache.
Docker layer caching allows Cloud Build to reuse previously built layers, significantly reducing the time spent re-downloading and re-installing dependencies. By specifying a cache image or using Kaniko's built-in cache, only changed layers are rebuilt, while unchanged dependency layers are pulled from the cache instead of being fetched from the internet each time.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Increase the machine type to e2-highcpu-32 to speed up compilation.
Why it's wrong here
Increasing machine type addresses CPU-bound compilation, but the stem's delay comes from downloading dependencies over the network, which extra vCPUs do not accelerate. Larger machine types suit compute-heavy builds such as parallel compilation or heavy test suites, where CPU, not network transfer, is the bottleneck.
- ✓
Use Docker layer caching with Cloud Build by specifying a cache image or using Kaniko cache.
Why this is correct
Kaniko or Docker layer caching stores previously built layers in a cache image, so Cloud Build reuses unchanged dependency layers instead of re-downloading and rebuilding them each run. This directly cuts the dependency-download time lengthening builds.
- ✗
Use Artifact Registry to store built packages and pull them during build.
Why it's wrong here
Artifact Registry stores your own built packages, not third-party dependencies, so pulling from it does not eliminate the external downloads causing the delay. It is the right choice for hosting private images and language packages your team publishes.
- ✗
Store dependencies in Cloud Source Repositories and fetch them during build.
Why it's wrong here
Cloud Source Repositories is a Git hosting service, not a package cache, so builds still download dependencies from upstream registries over the network. It would suit storing your own application source. Caching dependencies in Cloud Storage or Artifact Registry, or enabling the Kaniko cache, removes repeated downloads and directly addresses the delay.
Go deeper
Related to this question
Learn chapter
Cloud Build and CI/CD Pipelines
Key term
Cloud Build
Cloud Build is a managed service that compiles source code into deployable artifacts, often used in continuous integration and continuous delivery pipelines.
Key term
Image
An image is a complete snapshot of a system's operating system, applications, and settings, used to deploy or restore computing environments quickly.
About these practice questions
Courseiva writes every PCA question from scratch — 807 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This PCA practice question is part of Courseiva's free Google Cloud certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the PCA exam.