mirror of
https://git.bsd.gay/fef/nyastodon.git
synced 2024-12-25 06:13:43 +01:00
Use Account.local.sum(statuses_count) instead of Status.local.count (#4996)
It is faster.
This commit is contained in:
parent
66be6475b6
commit
9619b7f727
1 changed files with 1 additions and 1 deletions
|
@ -21,7 +21,7 @@ class InstancePresenter
|
||||||
end
|
end
|
||||||
|
|
||||||
def status_count
|
def status_count
|
||||||
Rails.cache.fetch('local_status_count') { Status.local.count }
|
Rails.cache.fetch('local_status_count') { Account.local.sum(:statuses_count) }
|
||||||
end
|
end
|
||||||
|
|
||||||
def domain_count
|
def domain_count
|
||||||
|
|
Loading…
Reference in a new issue