On Wed, Feb 17, 2010 at 05:52:28PM -0800, Dmitri Snytkine wrote:
> I have 2 choices: store the data in the database and put cookie in
> user's browser and next time user visits, I can just pull the
> username, name, etc from my database
> Or I can use user's access token/secret that I also store in database
> to get the fresh data from Twitter.
> Getting fresh data will guarantee that I have user's latest color
> settings, background, avatar, description
> But I may run over 150 requests per hour very easily.
> How is this usually done by other app developers? What's the best
> practice for synchronizing user's settings with Twitter?

The way I'm doing it on FishTwits is to cache the most recent profile
data for each user.  So I'm basically doing your first option (store it
in the database), but refreshing it with the latest fresh profile data
whenever I send or retrieve a status update for the user - that
information is already coming back with the status, so I can update it
without having to wait for any extra requests to complete.

Dave Sherohman

Reply via email to