Skip to content

fix(share): clear cache when shares or members change - #3145

Merged
cristianscheid merged 1 commit into
masterfrom
fix/2828/share-cache-invalidation
Nov 13, 2026
Merged

cristianscheid merged 1 commit into
masterfrom
fix/2828/share-cache-invalidation

Conversation

@cristianscheid

@cristianscheid cristianscheid commented Nov 9, 2026 •

Copy link
Copy Markdown
Member

Summary

  • when a share with a circle is changed (created, updated, removed), clear cache for all members of given circle (ShareWrapperService::clearCacheForCircle instead of clearCache)
  • also clear cache when new user is added to a circle
  • clear cache after DB writes instead of before

After fixes above, when sharing resource with team, members immediately see resource among files. Did some manual testing, and looks fine:

  1. share resource to team
  • as alice, created test_team and added bob
  • as alice, shared test_folder with test_team
  • as bob, could see test_folder among his files without need to wait 15min
  1. add member to team with existing share
  • as alice, created test_team
  • as alice, shared test_folder
  • as alive, added bob to test_team
  • as bob, could see test_folder among his files without need to wait 15min

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

@cristianscheid

Copy link
Copy Markdown
Member Author

/backport to stable35

@cristianscheid

Copy link
Copy Markdown
Member Author

/backport to stable34

@cristianscheid

Copy link
Copy Markdown
Member Author

/backport to stable33

Signed-off-by: Cristian Scheid <cristianscheid@gmail.com>
@cristianscheid
cristianscheid force-pushed the fix/2828/share-cache-invalidation branch from 770a518 to 201fe9c Compare November 13, 2026 09:34
@cristianscheid
cristianscheid merged commit af2c2ba into master Nov 13, 2026
46 of 47 checks passed
@cristianscheid
cristianscheid deleted the fix/2828/share-cache-invalidation branch November 13, 2026 09:57
@backportbot

backportbot Bot commented Nov 13, 2026

Copy link
Copy Markdown

The backport to stable33 failed. Please do this backport manually.

# Switch to the target branch and update it
git checkout stable33
git pull origin stable33

# Create the new backport branch
git checkout -b backport/3145/stable33

# Cherry pick the change from the commit sha1 of the change against the default branch
# This might cause conflicts, resolve them
git cherry-pick 201fe9c6

# Push the cherry pick commit to the remote repository and open a pull request
git push origin backport/3145/stable33

Error: Failed to check for changes with origin/stable33: No changes found in backport branch


Learn more about backports at https://docs.nextcloud.com/server/stable/go.php?to=developer-backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resources shared with a team are not immediately available/updated for members

3 participants