Skip to content

Comments

Sync caching logic with Prebid Server Java#16

Open
mike-hoyt-ttd wants to merge 1 commit intomainfrom
mho-OPATH-5639-Change-Cache-Behavior
Open

Sync caching logic with Prebid Server Java#16
mike-hoyt-ttd wants to merge 1 commit intomainfrom
mho-OPATH-5639-Change-Cache-Behavior

Conversation

@mike-hoyt-ttd
Copy link
Contributor

@mike-hoyt-ttd mike-hoyt-ttd commented Jan 21, 2026

The current returnCreative/caching logic is confusing, and doesn't work well when there are bids with multiple different media types (video + banner). I've decided to sync the functionality up with PBS Java.

Changes

  • Use separate flags for returnCreativeBids/returnCreativeVast instead of a single returnCreative
  • Only strip adm if the bid was actually cached

Behavior Comparison

Cache Config IsVideo ADM (old behavior) ADM (new behavior))
vastxml.returnCreative=false only No Stripped Kept
vastxml.returnCreative=false only Yes Stripped Stripped
bids.returnCreative=false only No Stripped Stripped
bids.returnCreative=false only Yes Stripped Stripped
bids.returnCreative=true, vast.returnCreative=false No Kept Kept
bids.returnCreative=true, vast.returnCreative=false Yes Kept Stripped
bids.returnCreative=false, vast.returnCreative=true No Kept Stripped
bids.returnCreative=false, vast.returnCreative=true Yes Kept Stripped
Cache config set, but no targeting enabled No Stripped Kept
Cache config set, but no targeting enabled Yes Stripped Kept

Comment on lines +50 to +52
cacheBids, cacheVAST bool
returnCreativeBids bool
returnCreativeVast bool
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Massively not a concern but I'm curious why this and not e.g.

type extCacheInstructions struct {
	cacheBids          bool
	cacheVAST          bool
	returnCreativeBids bool
	returnCreativeVast bool
}

or

type extCacheInstructions struct {
	cacheBids, cacheVAST bool
	returnCreativeBids, returnCreativeVast bool
}

(but note that this is not a blocker)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants