aiCache provides an elegant solution to this with pre-fetch technology.
aiCache allows you to configure a set of slower URLs to pre-load. It then pre-fetches and actively maintain a queue of fresh responses When these are requested, aiCache instantly serves the pre-fetched response.
By tailoring pre-fetch settings you can optimize the site so all responses are pre-fetched. aiCache collects and reports on pre-fetch statistics simplifying this task.
Each second, aiCache analyzes the queues of the advertising URL’s. When a queue contains too few responses, aiCache requests additional ads to maintain the optimum number. When a request comes for any advertising URL, aiCache removes a response from appropriate queue and sends it to the browser. The result is the website never waits for an advertising response.
aiCache provides a few seconds of queuing, ensuring an accurate set of statistics for served ads allowing accurate fast serving of content that scales independent of the performance of the advertising API.