How frequently to update?

Sic

Sic

Soldato
Joined
9 Nov 2004
Posts
15,365
Location
SO16
this is obviously just a matter of opinion, but I'm fairly sure some people have done something along similar lines to this before.

I'm currently writing a sort-of RSS reader - got all my parsing sorted, but I just need to know how frequently to check for new items. I was thinking of setting up a cron to run every 5 minutes but I figured this might be too much for anyone who may update a feed more frequently than that (or if they upload 50 photos to flickr at once or something annoying like that!). I guess the best option would be to allow a user to define how frequently the feed is updated but I'd like it to be more automatic than that.

so, what do people think? 2 minutes? or would you think 5 would be ok?
 
So long as you're doing a conditional HTTP GET (i.e. sending If-Modified-Since as respecting 304 statuses), 5 minutes will be fine. If you're not, then 5 minutes is far too short an interval.

What possible scenario is there where content is updated more often than every 5 minutes, and where the user needs to read that content as soon as it's published?
 
had a look at conditional http get, and what I'm doing is kinda similar - doing fopen on the url the stream_get_meta_data to get the last modified date. only problem is feedburner seems to use multiple servers so the last modified date becomes redundant in that instance. for speed's sake, I guess the best option will be to check the date and check for duplicates anyway. little more legwork, but not as much as no date modified checking at all!

My thinking behind the updating frequency was if someone is making a load of updates in a short space of time, it would be a way to catch all the updates they make for future.
 
Back
Top Bottom