displaying # views on a page without hitting database all the time
问题 More and more sites are displaying the number of views (and clicks like on dzone.com) certain pages receive. What is the best practice for keeping track of view #'s without hitting the database every load? I have a bunch of potential ideas on how to do this in my head but none of them seem viable. Thanks, first time user. 回答1: I would try the database approach first - returning the value of an autoincrement counter should be a fairly cheap operation so you might be surprised. Even keeping a