-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix: remove caching for avatar and logo apis to handle updates on avatar and logos. #6072
Conversation
WalkthroughThe changes in this pull request primarily involve the removal of caching decorators from various methods across multiple classes in the Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Outside diff range and nitpick comments (1)
apiserver/plane/app/views/workspace/member.py (1)
Line range hint
156-165
: Consider removing remaining cache invalidation decoratorsThe
leave
method still contains cache invalidation decorators while other methods had their caching removed. This inconsistency might still cause issues with avatar and logo updates.Consider removing these decorators to maintain consistency with the PR's objective:
- @invalidate_cache( - path="/api/workspaces/:slug/members/", - url_params=True, - user=False, - multiple=True, - ) - @invalidate_cache(path="/api/users/me/settings/") - @invalidate_cache( - path="api/users/me/workspaces/", user=False, multiple=True - ) @allow_permission( allowed_roles=[ROLE.ADMIN, ROLE.MEMBER, ROLE.GUEST], level="WORKSPACE" )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (3)
apiserver/plane/app/views/user/base.py
(0 hunks)apiserver/plane/app/views/workspace/base.py
(0 hunks)apiserver/plane/app/views/workspace/member.py
(1 hunks)
💤 Files with no reviewable changes (2)
- apiserver/plane/app/views/user/base.py
- apiserver/plane/app/views/workspace/base.py
🔇 Additional comments (2)
apiserver/plane/app/views/workspace/member.py (2)
Line range hint 1-400
: Verify frontend handling of uncached responses
With the removal of caching for workspace member data, ensure that:
- The frontend correctly handles potentially slower responses
- Avatar and logo updates are properly reflected without manual refresh
Let's check for related frontend code:
#!/bin/bash
# Description: Look for frontend code that might need updates
# Search for avatar/logo-related components and API calls
# Find avatar/logo-related components
rg -l "avatar|logo" --type ts --type tsx
# Find workspace member API calls
rg -l "workspaces/.+/members" --type ts --type tsx
Line range hint 65-91
: Monitor performance impact after cache removal
The removal of caching for the workspace member list aligns with the PR objective to handle immediate updates of avatars and logos. However, this could impact API response times for workspaces with many members.
Let's verify the potential performance impact:
Consider implementing:
- Client-side caching with proper cache invalidation for non-avatar/logo data
- Pagination if not already implemented
- Performance monitoring for this endpoint
Description
Remove caching from user related apis to handle updates to avatars and cover images. Old image links are still returned even when the new images are uploaded resulting in broken UI.
Summary by CodeRabbit
New Features
Bug Fixes
Chores