Fix #248 - Reload all accounts when fetching from cache
This commit is contained in:
parent
253970cb73
commit
816284d739
7 changed files with 53 additions and 16 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue