RSS caching
Moderator: General Moderators
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
RSS caching
Should RSS be cached? My feed-generation software has been generating .rss files, I recently realized that Apache was serving them as text/plain (naughty Apache!) After changing their content-type and giving them a default character set, I can't help but wonder whether or not Apache's aggressive caching mechanism is inappropriate for RSS feeds. Is it?
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA
I think they should as well. Not only can it save you some processing cycles, but it can also quicken the response time for people reading it. It just happens to be delayed a tiny bit, maybe, depending on how you do the caching.
I thought recently to use a cron to generate a static file once per minute (or maybe 30 seconds) using a data cache stored in a database for example.
I thought recently to use a cron to generate a static file once per minute (or maybe 30 seconds) using a data cache stored in a database for example.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Sorry about resurrecting the thread. I thought that I had resolved the issue, but there seems to be a very definite problem.
When Firefox requests the XML feed from the server, it gets returned as such (with default settings):
Something about these headers, however, causes Firefox to cache any successive request for the site. When I update the feed, and then attempt to load it with my RSS reader Sage, the changes don't come up. Even when I manually click the feed. I end up having to view-source:http://hp.jpsband.org/news.rss and Ctrl+F5 it to get the updated content to show up.
This is, to say the least, completely unacceptable. Does anyone know why this is happening?
When Firefox requests the XML feed from the server, it gets returned as such (with default settings):
Code: Select all
Status=OK - 200
Date=Mon, 02 Apr 2007 04:11:28 GMT
Server=Apache/2.0.54 (Unix) PHP/4.4.4 mod_ssl/2.0.54 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2 SVN/1.3.2
Last-Modified=Mon, 02 Apr 2007 03:52:59 GMT
Etag="14914a1-1479-28377cc0"
Accept-Ranges=bytes
Content-Length=5241
Keep-Alive=timeout=15, max=100
Connection=Keep-Alive
Content-Type=application/rss+xml; charset=utf-8This is, to say the least, completely unacceptable. Does anyone know why this is happening?
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US