Merge pull request #57912 from nextcloud/backport/57815/stable33

[stable33] feat: optimize user mount cache
This commit is contained in:
Andy Scherzinger 2026-01-29 20:56:45 +01:00 committed by GitHub
commit 4e3f0b5a2a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -382,7 +382,8 @@ class UserMountCache implements IUserMountCache {
$query = $builder->select('storage_id', 'root_id', 'user_id', 'mount_point', 'mount_id', 'f.path', 'mount_provider_class')
->from('mounts', 'm')
->innerJoin('m', 'filecache', 'f', $builder->expr()->eq('m.root_id', 'f.fileid'))
->where($builder->expr()->eq('storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->where($builder->expr()->eq('m.storage_id', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere($builder->expr()->eq('f.storage', $builder->createNamedParameter($storageId, IQueryBuilder::PARAM_INT)))
->andWhere(
$builder->expr()->orX(
$builder->expr()->eq('f.fileid', $builder->createNamedParameter($fileId)),