Views pages with with Drupal's built-in page cache, but RSS feeds of those view don't. They are regenerated from scratch on each hit. This is a pretty serious performance hit for sites with lots of subscribers.
The problem is that theme_views_rss_feed exit()'s without calling page_set_cache() or drupal_page_footer(), which allows a page to be cached. I've attached a patch that fixes this by adding a call to . In my limited testing, it works fine and cached rss feeds are returned over 10x faster. Since the same cache invalidation routines work fine for a normal View, I can't imagine that they'd cause a problem for an RSS feed of the same data.
If the page cache is not enabled in settings/performance than this patch effectively does nothing.
This patch should also ultimately reduce bandwidth costs, since Drupal will now be able to return more accurace Cache-Control and Last-Modified headers.
| Comment | File | Size | Author |
|---|---|---|---|
| views_rss_allow_page_cache.patch | 419 bytes | eli |
Comments
Comment #1
moshe weitzman commentedgood catch. should be ported to Views2 if it does the same exit.
Comment #2
merlinofchaos commentedLooks good to me.
Views 2 has a much better flow and doesn't exit for feeds.
Comment #3
esmerel commentedAt this time, only security fixes will be made to the 5.x version of Views.