Fasterperformance
The instance's counts are cached, for as long as you say.
The number of people and posts on the landing and about pages, in
/api/v1/instance and in NodeInfo used to be counted from the
database on every request. On a small server that was the slowest thing it
did. They are now kept, and a figure that has expired is still shown while a
fresh one is counted in the background, so no visitor waits for it.
The lifetime is a setting: System settings → Performance. Two hours is recommended and is the default. Pixelfed itself keeps these for twelve hours, and the page says so. Zero turns the cache off; the most is a day.