Skip to content

Conversation

@kesselb
Copy link
Collaborator

@kesselb kesselb commented May 15, 2025

Summary

Contacts is using a request like below to fetch the photo for a user from the vcard.

/remote.php/dav/addressbooks/users/alice/z-server-generated--system/Database:jane.vcf?photo

As fetching and parsing vcards might be expensive there's a cache for the photos in app-data. While there are event listeners in place to reset the cache for a vcard on update or delete, there might be still cases where it's helpful to clear the cache.

How to test:

  • Make sure you have some contacts
  • Open contacts
  • Check oc_filecache for paths like '%dav-photocache%'
  • Run the occ command
  • Check oc_filecache for paths like '%dav-photocache%'
  • Open contacts
  • Check oc_filecache for paths like '%dav-photocache%'

Backports:

Only the command, refactoring is for 32.

Checklist

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb added this to the Nextcloud 32 milestone May 15, 2025
@kesselb kesselb self-assigned this May 15, 2025
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
@kesselb kesselb force-pushed the bug/noid/clear-dav-photo-cache branch from f367139 to 3d1de79 Compare May 15, 2025 16:28
@kesselb kesselb added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 15, 2025
@kesselb kesselb requested a review from ChristophWurst May 15, 2025 16:46
@kesselb kesselb marked this pull request as ready for review May 15, 2025 16:46
@kesselb kesselb requested review from a team, SebastianKrupinski and hamza221 as code owners May 15, 2025 16:46
@kesselb kesselb requested review from Altahrim, ArtificialOwl and sorbaugh and removed request for a team May 15, 2025 16:46
Copy link
Contributor

@hamza221 hamza221 left a comment

Choose a reason for hiding this comment

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

Tested and works

@ChristophWurst ChristophWurst merged commit 80b21cd into master May 19, 2025
213 of 224 checks passed
@ChristophWurst ChristophWurst deleted the bug/noid/clear-dav-photo-cache branch May 19, 2025 16:10
@kesselb
Copy link
Collaborator Author

kesselb commented May 20, 2025

/backport 8a1ae09 to stable31

@kesselb
Copy link
Collaborator Author

kesselb commented May 20, 2025

/backport 8a1ae09 to stable30

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

Labels

3. to review Waiting for reviews enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants