8000 Bust profile header cache on assigning/removing spam role by lightalloy · Pull Request #21068 · forem/forem · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Bust profile header cache on assigning/removing spam role #21068

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 23, 2024

Conversation

lightalloy
Copy link
Contributor

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update

Description

  • changed user profile header cache_key
  • touch user profile on assigning role/removing role to invalidate that cache fragment

Maybe I would use users_roles.cache_key_with_version but we have habtm there (so, the table doesn't have timestamps), so that's not possible.
Touching user profile seemed light and straightforward enough.

Related Tickets & Documents

Closes #20846

QA Instructions, Screenshots, Recordings

  • enable caching on dev
  • assing user a spam role
  • their profile header should now include "spam" label
  • remove spam role
  • their profile header shouldn't include "spam" label

We currently have 2 labels: sync and async 🌚
изображение

Added/updated tests?

  • Yes

@lightalloy lightalloy requested a review from a team as a code owner May 23, 2024 12:41
Copy link
Contributor
github-actions bot commented May 23, 2024

Uffizzi Preview deployment-52185 was deleted.

@benhalpern benhalpern merged commit f08ed31 into main May 23, 2024
32 checks passed
@benhalpern benhalpern deleted the lightalloy/bust-profile-header branch May 23, 2024 13:24
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.

Bust cache on displayed user names when marked as spam to show spam label/pill
2 participants
0