TEENFRONT Posted September 7, 2009 Share Posted September 7, 2009 Hey All We have a dedicated ad server box thats currently serving around 3million impressions per day, spread across 3 advertiser networks. We use php/mysql to randomly choose 1 of the 3 ad codes to show on each page load. The thing is, once the user has browsed around a few pages, we are just repeating the mysql calls to select the code all over again. What would you say the best way to show ad codes is? I was thinking maybe cut the DB out all together and just have the ad codes in an array and show them randomly on each page load like that. Or maybe grab the codes from database, and cache them some how, then select them from the cache. The main aim is to cut down on the 3million+ db connects and queries. We still need it to be as fast as selecting from a DB. We tried storing the ad codes in a .txt file and grabbing the codes that way, that was slow and laggy. Any advice would be great. Im leaning towards storing ad codes in an array..maybe? lol. Thanks! Link to comment https://forums.phpfreaks.com/topic/173412-the-best-way-to-cacheshow-advertisements/ Share on other sites More sharing options...
Mark Baker Posted September 7, 2009 Share Posted September 7, 2009 APC or memcache Link to comment https://forums.phpfreaks.com/topic/173412-the-best-way-to-cacheshow-advertisements/#findComment-914176 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.