Skip to content

Caching UserSummary in Valkey without stale display names

UserSummary on every comment used to cost 3 SQL round-trips. We cache it in Valkey for 45s keyed by user:{id}:summary.

The failure mode is a display-name change that stays stale in a long thread. Mods noticed first.

We now bust that key on profile PUT. Still debating a 5s in-process L1 in Axum. Worth the split-brain?

5 replies

Staff view: please do not delete the thread if this is a duplicate. Link the canonical Issue instead.

Permalink

Posted a Guide recap of this thread so we are not asking people to mine comments.

Permalink

We hit the same wall on caching. Replica lag was the surprise, not CPU.

Permalink

For campus we used entity_type=course and left the template as Question. Search Console looks sane.

Permalink

Thanks — leaving this up for the next team that searches the same string.

Permalink

Weekly winners

Caching UserSummary in Valkey without stale display names

UserSummary on every comment used to cost 3 SQL round-trips. We cache it in Valkey for 45s keyed by user:{id}:summary.

The failure mode is a display-name change that stays stale in a long thread. Mods noticed first.

We now bust that key on profile PUT. Still debating a 5s in-process L1 in Axum. Worth the split-brain?

Replies 5

Hana Sato
Member

@hana_research

Staff view: please do not delete the thread if this is a duplicate. Link the canonical Issue instead.

Alex Rivera
StaffRegular

@alex_eng

Posted a Guide recap of this thread so we are not asking people to mine comments.

Marcus Vance

@marcus_dev

We hit the same wall on caching. Replica lag was the surprise, not CPU.

Elena Rostova
ModMember

@elena_support

For campus we used entity_type=course and left the template as Question. Search Console looks sane.

Hana Sato
Member

@hana_research

Thanks — leaving this up for the next team that searches the same string.

Join the conversation

Sign in or create an account to share your thoughts, solutions, or feedback.