summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Config/UserMountCache.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Files/Config/UserMountCache.php')
-rw-r--r--lib/private/Files/Config/UserMountCache.php27
1 files changed, 7 insertions, 20 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php
index a5fe04c2cac..c326eeb0b6c 100644
--- a/lib/private/Files/Config/UserMountCache.php
+++ b/lib/private/Files/Config/UserMountCache.php
@@ -36,7 +36,6 @@ use OCP\Files\Config\ICachedMountInfo;
use OCP\Files\Config\IUserMountCache;
use OCP\Files\Mount\IMountPoint;
use OCP\Files\NotFoundException;
-use OCP\ICache;
use OCP\IDBConnection;
use OCP\IUser;
use OCP\IUserManager;
@@ -46,30 +45,17 @@ use Psr\Log\LoggerInterface;
* Cache mounts points per user in the cache so we can easilly look them up
*/
class UserMountCache implements IUserMountCache {
- /**
- * @var IDBConnection
- */
- private $connection;
-
- /**
- * @var IUserManager
- */
- private $userManager;
+ private IDBConnection $connection;
+ private IUserManager $userManager;
/**
* Cached mount info.
- * Map of $userId to ICachedMountInfo.
- *
- * @var ICache
+ * @var CappedMemoryCache<ICachedMountInfo[]>
**/
- private $mountsForUsers;
-
+ private CappedMemoryCache $mountsForUsers;
private LoggerInterface $logger;
-
- /**
- * @var ICache
- */
- private $cacheInfoCache;
+ /** @var CappedMemoryCache<array> */
+ private CappedMemoryCache $cacheInfoCache;
/**
* UserMountCache constructor.
@@ -132,6 +118,7 @@ class UserMountCache implements IUserMountCache {
foreach ($addedMounts as $mount) {
$this->addToCache($mount);
+ /** @psalm-suppress InvalidArgument */
$this->mountsForUsers[$user->getUID()][] = $mount;
}
foreach ($removedMounts as $mount) {