Avatars and Post/Thread Counts not updating

BronyHeresy
Thread Starter - Word Associaton

Hey mods,
 
I was looking back at my posts, and discovered that the older a post is, the lower its thread/post count.
 
This is counter-intuitive for just about every forum user out there. If you could see about fixing this so that the username portion of each post displays current information rather than what the information was at time of posting, I’m sure it would be much appreciated by the userbase.
 
Your Humble Servant
 
-BH
Carcer
Bronze Bit -
Happy Derpy! -
A Perfectly Normal Pony - <Carcer> "Officer, unless I threatened to **** him in the ass, I don't believe I could have reasonably expected him to stop using my website."
Since the Beginning  - Posted the very first image. Indexes start at zero!

Inexplicably in power
This is to do with the way we cache fragments for efficiency. The information on those old posts is part of the cache, which will expire eventually, and then will be up to date as of the time the cache refreshes. The reason we have these caches to begin with is because dynamically generating the postcount/avatar display from the user data in the DB is very inefficient - caching allows us to significantly speed up browsing and reduce server load.
 
Invalidating the caches of every single post a user has made every time they post a new reply or change their avatar would be a performance degradation but I’m not sure how much of one (also one which would obviously get worse the more time that goes by and the larger the forum becomes). Clover would have to investigate. It’s possible we could reduce the expiry time on the caches to make them update much sooner - maybe let them be a few minutes out at most - but I’m not sure how much impact that would have, either.
Clover the Clever
Princess of Love - Extra special version for those who participated in the Canterlot Wedding 10th anniversary event by contributing art.
A Perfectly Normal Pony - <@CloverTheClever> I'd pay to see Carcer in a fursuit
Always Codes Drunk - It explains a lot
From the Night - I have technically banned myself a bunch of times...
Since the Beginning  - User number zero

Lord and Saviour
The majority of times you click on a topic and read it we haven’t touched the posts or users in the database at all. This is massively fast, obviously, and means better page load times for you everywhere on the site (slow forums = slow images, and vice versa - everything shares application server backends).
 
If we have to check each post to make sure our counts are precisely up to date we have to hit both users and posts up for info.
 
Most people don’t notice the difference, and all the caches do have reasonable (hours at most) expiry times set, so your data will be consistent everywhere eventually.
 
We felt it was a damn good tradeoff for the performance gain. If we get a lot of people complaining we may look into ways we can improve this without losing the performance - there are a few approaches we’re already looking at.
Interested in advertising on Derpibooru? Click here for information!
Champions of Equestria

Help fund the $15 daily operational cost of Derpibooru - support us financially!

Syntax quick reference: **bold** *italic* ||hide text|| `code` __underline__ ~~strike~~ ^sup^ %sub%

Detailed syntax guide