Skip to content
Snippets Groups Projects
Commit 9619b7f7 authored by Akihiko Odaki's avatar Akihiko Odaki Committed by Eugen Rochko
Browse files

Use Account.local.sum(statuses_count) instead of Status.local.count (#4996)

It is faster.
parent 66be6475
No related branches found
No related tags found
No related merge requests found
......@@ -21,7 +21,7 @@ class InstancePresenter
end
def status_count
Rails.cache.fetch('local_status_count') { Status.local.count }
Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) }
end
def domain_count
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment