Skip to content

Core: allow per-ad-unit video cache opt-out - #15716

Merged
patmmccann merged 5 commits into
prebid:masterfrom
aleksUIX:codex/15710-per-ad-unit-video-cache
Oct 20, 2026
Merged

patmmccann merged 5 commits into
prebid:masterfrom
aleksUIX:codex/15710-per-ad-unit-video-cache

Conversation

@aleksUIX

@aleksUIX aleksUIX commented Oct 4, 2026 •

Copy link
Copy Markdown
Contributor

Closes #15710.

Add the typed mediaTypes.video.cache option. Setting it to false skips remote and local caching performed by Prebid.js for that ad unit's video bids. Omission and true preserve existing rules. Cached and opted-out units can share an auction without changing global configuration, including when auctions overlap. Audio caching on mixed audio/video units is unchanged.

This option does not disable caching by Prebid Server or bidders. Supplied VAST URLs and cache keys are preserved, even when cache.ignoreBidderCacheKey is enabled. For outstream video, cache: false takes precedence over renderer-driven caching: an XML-only bid is rejected if its active renderer requires a VAST URL. A supplied VAST URL remains usable.

Documentation: prebid/prebid.github.io#6784.

Validation:

  • Full npx gulp test-only --browsers ChromeHeadless: 26,126 passed, 7 skipped, zero failures.
  • Actual auction cases cover mixed audio/video units, remote/local caching, and supplied cache keys under opt-out. The audio regressions fail before their correction.
  • All four changed executable lines are covered by the affected browser specs. Scoped gulp lint --nolintfix, TypeScript checks and git diff --check pass.
  • Six Fluid Player 3.60.0 playbacks completed on executable head d12d5e8f5 in Chrome 155. Both cached and directly consumed VAST played, tracked completion and resumed content. Mixed auctions made one cache POST; the default control made two. Later edits only clarify JSDoc and add a contract regression. This used controlled bids and a local cache endpoint; production publisher deployment remains untested.
  • A request-converter probe confirms the option leaves the separate Prebid Server cache policy intact.

Maintainer label request: feature, minor, core. My fork account cannot apply these labels.

@robertrmartinez

Copy link
Copy Markdown
Collaborator

looks like some conflicts. and you might have to alter the logic a bit because requiresVastUrl in master branch will still trigger cache. so just need to have it check your cache: false logic also.

@barecheck

barecheck Bot commented Oct 6, 2026 •

Copy link
Copy Markdown

Barecheck - Code coverage report

Total: 91.59%

Your code coverage diff: 0.00% ▴

Uncovered files and lines
FileLines
src/video.ts95
src/videoCache.ts336, 361, 363-365, 367, 382

@aleksUIX

aleksUIX commented Oct 9, 2026

Copy link
Copy Markdown
Contributor Author

Merged current master and applied cache: false to the requiresVastUrl path too. The regression cases cover both renderer fields and local rendering, plus bids that already have a VAST URL.

@github-actions

Copy link
Copy Markdown

This PR introduces changes that may not work on all browsers. According to Babel, the following polyfills may be needed, and they are not automatically included:

  • Changes to test/spec/auctionmanager_spec.js may need:
    • es.json.stringify
    • web.url-search-params.delete
    • web.url-search-params.has
    • web.url-search-params.size

The best way to address this is to provide good test coverage, as normal PR checks run unit tests on older browsers.

@patmmccann

Copy link
Copy Markdown
Collaborator

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-16T10:17:12.639721Z 84c28d0 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 84c28d0454

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@patmmccann
patmmccann merged commit 5809405 into prebid:master Oct 20, 2026
102 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Video cache mode is global, so cacheless and cached ad units cannot coexist in one session

3 participants