Skip to content

Conversation

@hlbmtc
Copy link
Contributor

@hlbmtc hlbmtc commented Dec 16, 2025

Currently, if you edit your username or any other profile data, those changes are only reflected on your own profile page. Other users still see the outdated version because we cache the entire /users/:id endpoint, including all User attributes.

  • This PR refactors profile caching so that only slow-to-compute stats are cached. The actual user info is no longer cached and is fetched directly from the database.
  • It also replaces the serialize_profile function with two smaller ones: serialize_metaculus_stats and serialize_user_stats.
  • Improved get_authoring_stats_data comments count query performance

Copy link
Contributor

@elisescu elisescu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@lsabor lsabor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me. I don't see any changes to data generation, just the cache :)

@hlbmtc hlbmtc merged commit d722912 into main Dec 18, 2025
3 checks passed
@hlbmtc hlbmtc deleted the fix/profile-caching branch December 18, 2025 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants