Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prebid Server returns exp, not ttl #5715

Merged
merged 1 commit into from
Sep 11, 2020
Merged

Prebid Server returns exp, not ttl #5715

merged 1 commit into from
Sep 11, 2020

Conversation

bretg
Copy link
Collaborator

@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