Forum OpenACS Q&A: Response to AdServer for OpenACS 4.x

Collapse
Posted by Gilbert Wong on
Well, I cache the ad information from the DB into nsv arrays.  The reason is that those don't change very often so the server does not need to make calls to the DB each time it serves an ad.  It's the same idea as using util_memoize to cache data that doesn't change very often.  You can then use the information stored in the arrays to serve specific ads based on user profile information, the section of the site, etc.  I probably didn't explain it very well in my inital post, but clickthroughs and impressions are logged in the DB at set intervals.