Master the IT-English vocabulary of CI build optimisation: dependency caches, layer caching, parallel jobs and cache keys.
0 / 25 completed
1 / 25
An engineer says: 'We cache node_modules keyed on the lockfile hash.' What is the 'cache key' for?
The cache key identifies a cache entry; when the lockfile hash changes the key changes and the cache is rebuilt.
2 / 25
What is a 'cache hit' in a CI pipeline?
A cache hit means a valid cached entry existed and was reused, speeding up the build.
3 / 25
The team 'parallelises' the test suite across jobs. What does that achieve?
Parallelising spreads work across runners so total elapsed time drops.
4 / 25
Which sentence correctly uses 'Docker layer caching'?
Ordering stable steps early lets Docker reuse cached layers, rebuilding only what changed.
5 / 25
A build is described as 'incremental'. What does that mean?
An incremental build reuses prior outputs and only rebuilds changed components.
6 / 25
Reviewer: 'I've noticed we're aggressively using Redis for caching our API responses. But are we validating the freshness of these cached results before serving them to the client? It might be worth adding an expiration time based on the last modified date of the resource, or implementing a Least Recently Used (LRU) eviction policy.'
Which of the following best reflects the reviewer's concern and proposed solution regarding API caching?
The reviewer is raising a crucial concern: stale data. While using Redis for caching can improve performance, blindly serving cached responses without checking their validity leads to potential issues where clients receive outdated information. The proposed solution of validating freshness (e.g., using last modified dates or an LRU policy) demonstrates best practice for ensuring API consumers are always receiving the most up-to-date data. Option A is incorrect because it misinterprets the reviewer's focus, while options C and D are irrelevant to the core issue.
7 / 25
PR Description:
"@john.doe Just finished implementing the new user profile endpoint. Caching is handled with a simple in-memory cache to reduce API calls and improve response times for frequently accessed data. I've used Map to store the cached profiles."
The PR description highlights a potentially flawed caching strategy. While an in-memory cache can improve response times for frequently accessed data, relying solely on it without considering concurrency and data consistency is risky. The reviewer's comment suggests that a more robust solution like a distributed cache (e.g., Redis) or a carefully designed locking mechanism would be preferable to avoid race conditions and ensure the integrity of user profile data. Using Map alone doesn't inherently solve these problems.
8 / 25
During a code review of a new feature for our e-commerce platform, Sarah says: 'We're using a CDN to serve static assets like images and JavaScript. The CDN intelligently caches these files based on their URLs.' David replies, 'That's great! But how do we ensure that if an image URL changes – say, due to a new product variant – the CDN doesn't continue serving the old, outdated version?' Which of the following best describes the core principle Sarah is leveraging and David's concern regarding CDN caching?
Sarah correctly highlights the use of URL-based caching by the CDN. This approach allows the CDN to efficiently store and serve assets based on their unique URLs. David's concern is valid – purely URL-based caching can lead to stale content if an asset's URL changes without the CDN being updated, which is why CDNs often combine this with other techniques like content hashing or versioning strategies. The key takeaway is that while URL-based caching offers benefits, it requires careful monitoring and potentially supplemental mechanisms for ensuring cache freshness.
9 / 25
During a standup update, Mark says: 'We've been using browser caching to reduce load times on our mobile app. Specifically, we're leveraging the `Cache-Control` headers to instruct browsers to store images and stylesheets for a week.' Emily asks, 'What does the Cache-Control header actually *do* in this context?' Which of the following best describes its primary function?
The Cache-Control header is a crucial mechanism for controlling how web browsers and CDNs store resources. It allows developers to specify *how long* a resource should be cached – for example, setting an expiration time or instructing the browser to use a 'cache-first' strategy. The incorrect options misinterpret its purpose; it doesn't automatically delete files or force downloads.
10 / 25
Reviewer: 'Our build process is *incremental*. This means that only the changed files are recompiled and packaged, drastically reducing build times compared to a full rebuild. However, we need to ensure the cache isn't becoming stale – specifically, if a dependency update introduces breaking changes, will our incremental builds still produce correct artifacts?'
The reviewer is highlighting a key aspect of incremental builds: they are designed for speed by only rebuilding affected parts. However, the term 'incremental' doesn't inherently guarantee accuracy or resilience to dependency changes. The core issue is that stale cached artifacts could lead to problems if dependencies have shifted. Option A misinterprets 'incremental' as automatic compatibility; option C confuses build speed with correctness and option D states an unrealistic guarantee. Therefore, understanding that incremental builds require ongoing monitoring and potentially rollback strategies is crucial.
11 / 25
Reviewer: 'I've noticed we're aggressively using Redis for caching our API responses. But are we validating the freshness of these cached results before serving them to the client? It might be worth adding an expiration time based on the last modified date of the resource, or implementing a Least Recently Used (LRU) eviction policy.'
Which of the following best reflects the reviewer's concern and proposed solution regarding API caching?
The reviewer is raising a crucial concern: stale data. While using Redis for caching can improve performance, blindly serving cached responses without checking their validity leads to potential issues where clients receive outdated information. The proposed solution of validating freshness (e.g., using last modified dates or an LRU policy) demonstrates best practice for ensuring API consumers are always receiving the most up-to-date data. Option A is incorrect because it misinterprets the reviewer's focus, while options C and D are irrelevant to the core issue.
12 / 25
PR Description:
"@john.doe Just finished implementing the new user profile endpoint. Caching is handled with a simple in-memory cache to reduce API calls and improve response times for frequently accessed data. I've used Map to store the cached profiles."
The PR description highlights a potentially flawed caching strategy. While an in-memory cache can improve response times for frequently accessed data, relying solely on it without considering concurrency and data consistency is risky. The reviewer's comment suggests that a more robust solution like a distributed cache (e.g., Redis) or a carefully designed locking mechanism would be preferable to avoid race conditions and ensure the integrity of user profile data. Using Map alone doesn't inherently solve these problems.
13 / 25
During a code review of a new feature for our e-commerce platform, Sarah says: 'We're using a CDN to serve static assets like images and JavaScript. The CDN intelligently caches these files based on their URLs.' David replies, 'That's great! But how do we ensure that if an image URL changes – say, due to a new product variant – the CDN doesn't continue serving the old, outdated version?' Which of the following best describes the core principle Sarah is leveraging and David's concern regarding CDN caching?
Sarah correctly highlights the use of URL-based caching by the CDN. This approach allows the CDN to efficiently store and serve assets based on their unique URLs. David's concern is valid – purely URL-based caching can lead to stale content if an asset's URL changes without the CDN being updated, which is why CDNs often combine this with other techniques like content hashing or versioning strategies. The key takeaway is that while URL-based caching offers benefits, it requires careful monitoring and potentially supplemental mechanisms for ensuring cache freshness.
14 / 25
During a standup update, Mark says: 'We've been using browser caching to reduce load times on our mobile app. Specifically, we're leveraging the `Cache-Control` headers to instruct browsers to store images and stylesheets for a week.' Emily asks, 'What does the Cache-Control header actually *do* in this context?' Which of the following best describes its primary function?
The Cache-Control header is a crucial mechanism for controlling how web browsers and CDNs store resources. It allows developers to specify *how long* a resource should be cached – for example, setting an expiration time or instructing the browser to use a 'cache-first' strategy. The incorrect options misinterpret its purpose; it doesn't automatically delete files or force downloads.
15 / 25
Reviewer: 'Our build process is *incremental*. This means that only the changed files are recompiled and packaged, drastically reducing build times compared to a full rebuild. However, we need to ensure the cache isn't becoming stale – specifically, if a dependency update introduces breaking changes, will our incremental builds still produce correct artifacts?'
The reviewer is highlighting a key aspect of incremental builds: they are designed for speed by only rebuilding affected parts. However, the term 'incremental' doesn't inherently guarantee accuracy or resilience to dependency changes. The core issue is that stale cached artifacts could lead to problems if dependencies have shifted. Option A misinterprets 'incremental' as automatic compatibility; option C confuses build speed with correctness and option D states an unrealistic guarantee. Therefore, understanding that incremental builds require ongoing monitoring and potentially rollback strategies is crucial.
16 / 25
Reviewer: 'I've noticed we're aggressively using Redis for caching our API responses. But are we validating the freshness of these cached results before serving them to the client? It might be worth adding an expiration time based on the last modified date of the resource, or implementing a Least Recently Used (LRU) eviction policy.'
Which of the following best reflects the reviewer's concern and proposed solution regarding API caching?
The reviewer is raising a crucial concern: stale data. While using Redis for caching can improve performance, blindly serving cached responses without checking their validity leads to potential issues where clients receive outdated information. The proposed solution of validating freshness (e.g., using last modified dates or an LRU policy) demonstrates best practice for ensuring API consumers are always receiving the most up-to-date data. Option A is incorrect because it misinterprets the reviewer's focus, while options C and D are irrelevant to the core issue.
17 / 25
PR Description:
"@john.doe Just finished implementing the new user profile endpoint. Caching is handled with a simple in-memory cache to reduce API calls and improve response times for frequently accessed data. I've used Map to store the cached profiles."
The PR description highlights a potentially flawed caching strategy. While an in-memory cache can improve response times for frequently accessed data, relying solely on it without considering concurrency and data consistency is risky. The reviewer's comment suggests that a more robust solution like a distributed cache (e.g., Redis) or a carefully designed locking mechanism would be preferable to avoid race conditions and ensure the integrity of user profile data. Using Map alone doesn't inherently solve these problems.
18 / 25
During a code review of a new feature for our e-commerce platform, Sarah says: 'We're using a CDN to serve static assets like images and JavaScript. The CDN intelligently caches these files based on their URLs.' David replies, 'That's great! But how do we ensure that if an image URL changes – say, due to a new product variant – the CDN doesn't continue serving the old, outdated version?' Which of the following best describes the core principle Sarah is leveraging and David's concern regarding CDN caching?
Sarah correctly highlights the use of URL-based caching by the CDN. This approach allows the CDN to efficiently store and serve assets based on their unique URLs. David's concern is valid – purely URL-based caching can lead to stale content if an asset's URL changes without the CDN being updated, which is why CDNs often combine this with other techniques like content hashing or versioning strategies. The key takeaway is that while URL-based caching offers benefits, it requires careful monitoring and potentially supplemental mechanisms for ensuring cache freshness.
19 / 25
During a standup update, Mark says: 'We've been using browser caching to reduce load times on our mobile app. Specifically, we're leveraging the `Cache-Control` headers to instruct browsers to store images and stylesheets for a week.' Emily asks, 'What does the Cache-Control header actually *do* in this context?' Which of the following best describes its primary function?
The Cache-Control header is a crucial mechanism for controlling how web browsers and CDNs store resources. It allows developers to specify *how long* a resource should be cached – for example, setting an expiration time or instructing the browser to use a 'cache-first' strategy. The incorrect options misinterpret its purpose; it doesn't automatically delete files or force downloads.
20 / 25
Reviewer: 'Our build process is *incremental*. This means that only the changed files are recompiled and packaged, drastically reducing build times compared to a full rebuild. However, we need to ensure the cache isn't becoming stale – specifically, if a dependency update introduces breaking changes, will our incremental builds still produce correct artifacts?'
The reviewer is highlighting a key aspect of incremental builds: they are designed for speed by only rebuilding affected parts. However, the term 'incremental' doesn't inherently guarantee accuracy or resilience to dependency changes. The core issue is that stale cached artifacts could lead to problems if dependencies have shifted. Option A misinterprets 'incremental' as automatic compatibility; option C confuses build speed with correctness and option D states an unrealistic guarantee. Therefore, understanding that incremental builds require ongoing monitoring and potentially rollback strategies is crucial.
21 / 25
Reviewer: 'I've noticed we're aggressively using Redis for caching our API responses. But are we validating the freshness of these cached results before serving them to the client? It might be worth adding an expiration time based on the last modified date of the resource, or implementing a Least Recently Used (LRU) eviction policy.'
Which of the following best reflects the reviewer's concern and proposed solution regarding API caching?
The reviewer is raising a crucial concern: stale data. While using Redis for caching can improve performance, blindly serving cached responses without checking their validity leads to potential issues where clients receive outdated information. The proposed solution of validating freshness (e.g., using last modified dates or an LRU policy) demonstrates best practice for ensuring API consumers are always receiving the most up-to-date data. Option A is incorrect because it misinterprets the reviewer's focus, while options C and D are irrelevant to the core issue.
22 / 25
PR Description:
"@john.doe Just finished implementing the new user profile endpoint. Caching is handled with a simple in-memory cache to reduce API calls and improve response times for frequently accessed data. I've used Map to store the cached profiles."
The PR description highlights a potentially flawed caching strategy. While an in-memory cache can improve response times for frequently accessed data, relying solely on it without considering concurrency and data consistency is risky. The reviewer's comment suggests that a more robust solution like a distributed cache (e.g., Redis) or a carefully designed locking mechanism would be preferable to avoid race conditions and ensure the integrity of user profile data. Using Map alone doesn't inherently solve these problems.
23 / 25
During a code review of a new feature for our e-commerce platform, Sarah says: 'We're using a CDN to serve static assets like images and JavaScript. The CDN intelligently caches these files based on their URLs.' David replies, 'That's great! But how do we ensure that if an image URL changes – say, due to a new product variant – the CDN doesn't continue serving the old, outdated version?' Which of the following best describes the core principle Sarah is leveraging and David's concern regarding CDN caching?
Sarah correctly highlights the use of URL-based caching by the CDN. This approach allows the CDN to efficiently store and serve assets based on their unique URLs. David's concern is valid – purely URL-based caching can lead to stale content if an asset's URL changes without the CDN being updated, which is why CDNs often combine this with other techniques like content hashing or versioning strategies. The key takeaway is that while URL-based caching offers benefits, it requires careful monitoring and potentially supplemental mechanisms for ensuring cache freshness.
24 / 25
During a standup update, Mark says: 'We've been using browser caching to reduce load times on our mobile app. Specifically, we're leveraging the `Cache-Control` headers to instruct browsers to store images and stylesheets for a week.' Emily asks, 'What does the Cache-Control header actually *do* in this context?' Which of the following best describes its primary function?
The Cache-Control header is a crucial mechanism for controlling how web browsers and CDNs store resources. It allows developers to specify *how long* a resource should be cached – for example, setting an expiration time or instructing the browser to use a 'cache-first' strategy. The incorrect options misinterpret its purpose; it doesn't automatically delete files or force downloads.
25 / 25
Reviewer: 'Our build process is *incremental*. This means that only the changed files are recompiled and packaged, drastically reducing build times compared to a full rebuild. However, we need to ensure the cache isn't becoming stale – specifically, if a dependency update introduces breaking changes, will our incremental builds still produce correct artifacts?'
The reviewer is highlighting a key aspect of incremental builds: they are designed for speed by only rebuilding affected parts. However, the term 'incremental' doesn't inherently guarantee accuracy or resilience to dependency changes. The core issue is that stale cached artifacts could lead to problems if dependencies have shifted. Option A misinterprets 'incremental' as automatic compatibility; option C confuses build speed with correctness and option D states an unrealistic guarantee. Therefore, understanding that incremental builds require ongoing monitoring and potentially rollback strategies is crucial.
What will I practice in "Build Optimization & Caching"?
This is a CI/CD Pipeline Language exercise set. It walks through 25 scenario-based multiple-choice questions built around real usage of CI/CD Pipeline Language terminology that IT professionals encounter on the job.
Is this exercise free to use?
Yes. Every exercise on CoderSlingo, including this one, is free to complete with no account, sign-up, or paywall.
How many questions are in this exercise?
This set contains 25 questions. Each one shows immediate feedback and a detailed explanation after you answer, so you learn the correct usage right away rather than waiting for a final score.
Do I need prior experience to complete this exercise?
No prior experience is required. Each question includes a full explanation covering the reasoning behind the correct answer, so the exercise itself teaches the CI/CD Pipeline Language vocabulary as you go.
Can I retry the exercise if I get questions wrong?
Yes — use the "Try again" button on the results screen to reset your answers and go through all the questions again. There is no limit on attempts.
Is my progress saved?
Your answers and score for the current session are tracked in the browser as you go. No account or login is needed, and there is nothing to install.
What if I don't understand a term used in a question?
Read the explanation shown after you answer each question — it breaks down the correct term in plain English with a real-world example. You can also check the site Glossary for quick definitions.
How is this different from reading a blog article on the topic?
Exercises like this one are interactive drills that test and reinforce specific vocabulary through multiple-choice questions, while blog articles explain concepts in prose. Practising here after reading builds active recall, not just passive recognition.
Where can I find more CI/CD Pipeline Language exercises?
See the CI/CD Pipeline Language exercises hub for the full set of related pages, or browse all exercise categories from the main Exercises index.
Can I use this exercise to prepare for a technical interview?
Yes — CI/CD Pipeline Language vocabulary comes up often in technical discussions and interviews. Pair this exercise with our dedicated Interview Preparation section for role-specific practice.