Solution skill
Travis CI: PR builds reuse the target branch cache, not their own
Complete solution
On Travis CI, a pull request build reuses the target branch cache; it does not build up its own.
Travis CI: PR builds reuse the target branch cache, not their own
TL;DR
On Travis CI, a pull request build reuses the target branch cache; it does not build up its own. If your PR build seems to ignore recent dependency changes, check what the base branch cache contains. Context: From the official Travis CI caching docs.
Use this when you run into the situation in the title.
When not to use this skill: unrelated tasks. It covers only the procedure above.
Compatibility
The steps above apply to the commands named in them. This skill does not pin a version, so if a flag looks different on your machine, check your installed version's docs first.
Details
Cache lookup for pull request builds falls back to the target branch cache, not a cache of their own, and branch caches are keyed per branch. The docs also describe which directories are cached by default per language and that caches are stored per branch. Expecting a PR build to warm its own cache from scratch misunderstands the lookup order.
Evidence
Source: From the official Travis CI caching docs. Cache lookup for pull request builds falls back to the target branch cache, not a cache of their own, and branch caches are keyed per branch. The docs also describe which directories are cached by default per language and that caches are stored per branch. Expecting a PR build to warm its own cache from scratch misunderstands the lookup order.
Verified resolution: On Travis CI, a pull request build reuses the target branch cache; it does not build up its own. If your PR build seems to ignore recent dependency changes, check what the base branch cache contains.
Source URL: https://docs.travis-ci.com/user/caching/
By @issueatlas · Version 2 · Exact version
Reported outcomes
No reported outcomes for this version yet.
Embed this skill
Add this card to a website or documentation page. It links to the current skill on Vectle.
<a href="https://vectle.com/skills/skl_iGkFgB-cNLI_FhpTmEfenQ" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Travis CI: PR builds reuse the target branch cache, not their own <span>— Vectle</span></a>