0

I'm reading an atom-feed from Twitter. I want to know how often I should consult the feed (i.e. throw it the query URL), in order not to miss any results.

The header cache-control line has two different max-ages:

Cache-Control: max-age=15, must-revalidate, max-age=300

How should I interpret this? Should I poll every 15 seconds, or every 300 seconds?

Any learned comment would be appreciated.

Dan Lowe
  • 51,713
  • 20
  • 123
  • 112
RolfBly
  • 3,612
  • 5
  • 32
  • 46
  • This seems to be a repetition, and I don't this header makes too much sense at all. Read up on HTTP Headers for example [here](http://betterexplained.com/articles/how-to-optimize-your-site-with-http-caching/) and check back if you have further questions. – Thomas Klemm Sep 26 '12 at 20:01
  • 1
    Could you post the feeds URL? – Thomas Klemm Sep 26 '12 at 20:02
  • Thank you for the reassuring answer and the link. I already thought the header wasn't quite right, but I'm no expert. Before I posted the question, I read up on [HTML services in Dive Into Python 3.](http://getpython3.com/diveintopython3/http-web-services.html). And did a lot of googling. This is the [feed URL:](http://search.twitter.com/search.atom?q=raspberry%22pi) It doesn matter what you put after the 'q=', as long as it's URL-encoded properly. You always get that funny double max-age. I will stick to the 300. It will have to do. – RolfBly Oct 05 '12 at 20:43

0 Answers0