Improve counter caches on Status and Account (#7644)
Do not touch statuses_count on accounts table when mass-destroying statuses to reduce load when removing accounts, same for reblogs_count and favourites_count Do not count statuses with direct visibility in statuses_count Fix #828
Showing
- app/models/favourite.rb 24 additions, 1 deletionapp/models/favourite.rb
- app/models/status.rb 49 additions, 2 deletionsapp/models/status.rb
- app/services/batched_remove_status_service.rb 4 additions, 1 deletionapp/services/batched_remove_status_service.rb
- app/services/suspend_account_service.rb 4 additions, 3 deletionsapp/services/suspend_account_service.rb
- spec/models/account_spec.rb 31 additions, 0 deletionsspec/models/account_spec.rb
- spec/models/status_spec.rb 14 additions, 0 deletionsspec/models/status_spec.rb
Loading
Please register or sign in to comment