Merge pull request #51921 from nextcloud/usermountcache-logging

feat: add debug logging for adding/removing items from the user mounts cache
enh/issues-563-calendar-import-export
Ferdinand Thiessen 4 weeks ago committed by GitHub
commit 0c51b09005
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 3
      lib/private/Files/Config/UserMountCache.php

@ -98,15 +98,18 @@ class UserMountCache implements IUserMountCache {
$userUID = $user->getUID();
try {
foreach ($addedMounts as $mount) {
$this->logger->debug("Adding mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->addToCache($mount);
/** @psalm-suppress InvalidArgument */
$this->mountsForUsers[$userUID][$mount->getKey()] = $mount;
}
foreach ($removedMounts as $mount) {
$this->logger->debug("Removing mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->removeFromCache($mount);
unset($this->mountsForUsers[$userUID][$mount->getKey()]);
}
foreach ($changedMounts as $mount) {
$this->logger->debug("Updating mount '{$mount->getKey()}' for user '$userUID'", ['app' => 'files', 'mount_provider' => $mount->getMountProvider()]);
$this->updateCachedMount($mount);
/** @psalm-suppress InvalidArgument */
$this->mountsForUsers[$userUID][$mount->getKey()] = $mount;

Loading…
Cancel
Save