From 816284d73924ceb453c76d571bcb315be91b2b08 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 3 Dec 2016 18:21:26 +0100 Subject: Fix #248 - Reload all accounts when fetching from cache --- app/models/feed.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/models/feed.rb') diff --git a/app/models/feed.rb b/app/models/feed.rb index 7b181d529..5e1905e15 100644 --- a/app/models/feed.rb +++ b/app/models/feed.rb @@ -14,9 +14,9 @@ class Feed # If we're after most recent items and none are there, we need to precompute the feed if unhydrated.empty? && max_id == '+inf' && since_id == '-inf' RegenerationWorker.perform_async(@account.id, @type) - @statuses = Status.send("as_#{@type}_timeline", @account).paginate_by_max_id(limit, nil, nil) + @statuses = Status.send("as_#{@type}_timeline", @account).cache_ids.paginate_by_max_id(limit, nil, nil) else - status_map = Status.where(id: unhydrated).map { |s| [s.id, s] }.to_h + status_map = Status.where(id: unhydrated).cache_ids.map { |s| [s.id, s] }.to_h @statuses = unhydrated.map { |id| status_map[id] }.compact end -- cgit