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

Core: Local cache for video bids #12598

Draft
wants to merge 9 commits into
base: master
Choose a base branch
from
Draft

Conversation

mkomorski
Copy link
Collaborator

Type of change

  • Feature

Description of change

Other information

vastsLocalCache.set(getLocalCacheBidId(bid), dataUri);
};

export async function getLocalCachedBidWithGam(adTagUrl) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

This should be in the dfp module.

IMO the GAM flow in general needs to change, instead of calling dfp's buildVideoUrl and passing the URL to the player it should be something like getVast and pass the XML to the player, which should work regardless of whether one is using local cache, and should also be the same thing that's called by the video module (regardless of the type of cache in use).

It might help to update / add a non-video module example to flesh out how the new API should look.


const gamVastWrapper = await response.text();
const bidVastDataUri = vastsLocalCache.get(`${hb_bidder}_${hb_adid}`);
const mockUrl = LOCAL_CACHE_MOCK_URL + hb_bidder;
Copy link
Collaborator

Choose a reason for hiding this comment

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

the "normal" cache generates a UUID which is then passed on to the creative and echoed back in the VAST.

I think the local cache could also generate a UUID, pass it along in the same way, and this could look for it in the response contents instead of imposing a different URL structure in the creative. It'd have the advantage of working with existing integrations, and being easier to switch into / out of.

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