Created
August 19, 2014 16:09
-
-
Save jakelear/bcd6668f0321a56f5bd6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/app/controllers/rss_controller.rb b/app/controllers/rss_controller.rb | |
index c27e263..f556ca4 100644 | |
--- a/app/controllers/rss_controller.rb | |
+++ b/app/controllers/rss_controller.rb | |
@@ -580,6 +580,7 @@ class RssController < BaseCommunityController | |
def load_feed_filter(filter) | |
@feed_title = get_feed_title(filter.title) | |
+ @feed_updated_at = filter.updated_at | |
@root_url = url_for(current_community) | |
@feed_url = get_feed_url("partner/#{filter.slug}/") | |
@feed_body_type = filter.plain_text ? 'text' : 'html' | |
diff --git a/app/views/rss/feed_filter.xml.builder b/app/views/rss/feed_filter.xml.builder | |
index ff9c8d0..a8dd1ca 100644 | |
--- a/app/views/rss/feed_filter.xml.builder | |
+++ b/app/views/rss/feed_filter.xml.builder | |
@@ -11,7 +11,7 @@ xml.feed("xmlns" => "http://www.w3.org/2005/Atom", "xml:lang" => "en") do | |
xml.id(@feed_url) | |
xml.link(:type => "text/html", :href => @root_url, :rel => "alternate") | |
for e in @entries | |
- cache "entry:feed_filter:xml:#{e.id}:#{e.version}",:expires_in=>24.hours do | |
+ cache "entry:feed_filter:xml:#{e.id}:#{e.version}:#{@feed_updated_at}",:expires_in=>24.hours do | |
xml.entry do | |
unless e.published_date && e.modified_date | |
raise "Bad entry in feed: #{e.inspect}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment