Lunny Xiao a4df01b580
Optimize total count of feed when loading activities in user dashboard. (#33841)
Two SQLs are very slow when `action` table have over 5M records.

```
database duration=1.8881s db.sql="SELECT created_unix DIV 900 * 900 AS timestamp, count(user_id) as contributions FROM `action` WHERE user_id=? AND act_user_id=? AND (created_unix > ?) GROUP BY timestamp ORDER BY timestamp"

database duration=1.5408s db.sql="SELECT count(*) FROM `action` WHERE (user_id = ?) AND (is_deleted = ?)"
```

This will cache the count for the first loading or when the activities
changed.
2025-03-20 10:46:18 -07:00
..
2025-02-20 12:39:21 -08:00
2025-03-03 05:36:10 +00:00
2025-03-08 21:47:11 +08:00
2024-06-11 18:47:45 +00:00
2025-03-11 10:40:38 -07:00
2024-12-30 14:35:46 -08:00
2024-12-30 14:35:46 -08:00