The Lurker
A bit more Lurker work
I decided to update the other blogs page so that it displays the time each blog was last updated. Unfortunately, I couldn't find out how to do this with LiveJournal blogs. All of these blogs have RSS feeds. Helpfully, the Radio RSS feed has a Last-Modified timestamp, so I can tell when Kevin's blog has been updated by doing a HEAD request on his RSS feed. Unfortunately LiveJournal doesn't do this, nor does its RSS contain a timestamp. So instead, I've got a bit of a hack which will have to do. It does this by calculating the MD5 hash of the RSS feed, and comparing to the previous MD5. If they're different, the blog has changed at some point since the old MD5 was calculated — it pretends it was updated "just now".
Because it would be obnoxious to do this on every request, it caches the result for half an hour. My current to-do list looks like this:
- use caching on the main page
- RSS
- set last-modified properly
- that whole "create new content" thing
I've made some progress on that last item. I've written the Python part, I just need to do the PHP side of things, and add a little bit to the Python to retrieve what the PHP part will send it. Oh, and it should invalidate the caches that don't exist yet.
Related topics: The Lurker
All timestamps are Melbourne time.