Skip to content

Prebid Server returns exp, not ttl#5715

Merged
mkendall07 merged 1 commit intomasterfrom
pbs-bidadapter-exp
Sep 11, 2020
Merged

Prebid Server returns exp, not ttl#5715
mkendall07 merged 1 commit intomasterfrom
pbs-bidadapter-exp

Conversation

@bretg
Copy link
Contributor

@bretg bretg commented Sep 8, 2020

Type of change

  • [ X ] Bugfix

Description of change

Updating how pbsBidAdapter sets the "TTL" for bids.

TTL in PBJS terms is how long the bid can stay in cache. However, the OpenRTB standard location for this value is exp.

Related to prebid/prebid-server#1386

Updating how pbsBidAdapter sets the "TTL" for bids. 

TTL in PBJS terms is how long the bid can stay in cache. However, the OpenRTB standard location for this value is `exp`.
const configTtl = _s2sConfig.defaultTtl || DEFAULT_S2S_TTL;
bidObject.ttl = (bid.ttl) ? bid.ttl : configTtl;
// the OpenRTB location for "TTL" as understood by Prebid.js is "exp" (expiration).
bidObject.ttl = (bid.exp) ? bid.exp : configTtl;
Copy link
Collaborator

Choose a reason for hiding this comment

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

This works.

Although I would just do

bidObject.ttl = bid.exp || configTtl;

But maybe I am not thinking of some use case as the previous code was doing the same thing.

@GLStephen
Copy link
Collaborator

@smenzer this looks like it has two reviewers and it is assigned to me. What's the purpose of that?

@smenzer
Copy link
Collaborator

smenzer commented Sep 9, 2020

Sorry @GLStephen i didn't notice the second reviewer. Will remove you.

@smenzer smenzer assigned mkendall07 and unassigned GLStephen Sep 9, 2020
@mkendall07 mkendall07 merged commit 896cc0f into master Sep 11, 2020
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.

5 participants

Comments