This website works better with JavaScript.
Home
Explore
Help
Sign In
closed-social
/
mastodon
Watch
3
Star
0
Fork
2
Code
Issues
5
Pull Requests
0
Projects
0
Releases
3
Wiki
Activity
Browse Source
Use Account.local.sum(statuses_count) instead of Status.local.count (
#4996
)
It is faster.
pull/4/head
Akihiko Odaki
6 years ago
committed by
Eugen Rochko
parent
66be6475b6
commit
9619b7f727
1 changed files
with
1 additions
and
1 deletions
Split View
Diff Options
Show Stats
Download Patch File
Download Diff File
+1
-1
app/presenters/instance_presenter.rb
+ 1
- 1
app/presenters/instance_presenter.rb
View File
@ -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
Write
Preview
Loading…
Cancel
Save