IUserMountCache
in
Cache mounts points per user in the cache so we can easily look them up
Tags
Table of Contents
Methods
- clear() : void
- Clear all entries from the in-memory cache
- getMountForPath() : ICachedMountInfo
- Get all cached mounts for a user
- getMountsForFileId() : array<string|int, ICachedMountFileInfo>
- Get all cached mounts that contain a file
- getMountsForRootId() : array<string|int, ICachedMountInfo>
- Get all cached mounts by root
- getMountsForStorageId() : array<string|int, ICachedMountInfo>
- Get all cached mounts by storage
- getMountsForUser() : array<string|int, ICachedMountInfo>
- Get all cached mounts for a user
- getMountsInPath() : array<string|int, ICachedMountInfo>
- Get all cached mounts for a user inside a path
- getUsedSpaceForUsers() : array<string|int, int>
- Get the used space for users
- registerMounts() : mixed
- Register mounts for a user to the cache
- remoteStorageMounts() : mixed
- Remove all cached mounts for a storage
- removeUserMounts() : mixed
- Remove all cached mounts for a user
- removeUserStorageMount() : mixed
- Remove all mounts for a user and storage
Methods
clear()
Clear all entries from the in-memory cache
public
clear() : void
Tags
getMountForPath()
Get all cached mounts for a user
public
getMountForPath(IUser $user, string $path) : ICachedMountInfo
Parameters
- $user : IUser
- $path : string
Tags
Return values
ICachedMountInfogetMountsForFileId()
Get all cached mounts that contain a file
public
getMountsForFileId(int $fileId[, string|null $user = null ]) : array<string|int, ICachedMountFileInfo>
Parameters
- $fileId : int
- $user : string|null = null
-
optionally restrict the results to a single user @since 12.0.0
Tags
Return values
array<string|int, ICachedMountFileInfo>getMountsForRootId()
Get all cached mounts by root
public
getMountsForRootId(int $rootFileId) : array<string|int, ICachedMountInfo>
Parameters
- $rootFileId : int
Tags
Return values
array<string|int, ICachedMountInfo>getMountsForStorageId()
Get all cached mounts by storage
public
getMountsForStorageId(int $numericStorageId[, string|null $user = null ]) : array<string|int, ICachedMountInfo>
Parameters
- $numericStorageId : int
- $user : string|null = null
-
limit the results to a single user @since 12.0.0
Tags
Return values
array<string|int, ICachedMountInfo>getMountsForUser()
Get all cached mounts for a user
public
getMountsForUser(IUser $user) : array<string|int, ICachedMountInfo>
Parameters
- $user : IUser
Tags
Return values
array<string|int, ICachedMountInfo>getMountsInPath()
Get all cached mounts for a user inside a path
public
getMountsInPath(IUser $user, string $path) : array<string|int, ICachedMountInfo>
Parameters
- $user : IUser
- $path : string
Tags
Return values
array<string|int, ICachedMountInfo>getUsedSpaceForUsers()
Get the used space for users
public
getUsedSpaceForUsers(array<string|int, IUser> $users) : array<string|int, int>
Note that this only includes the space in their home directory, not any incoming shares or external storage.
Parameters
- $users : array<string|int, IUser>
Tags
Return values
array<string|int, int> —[$userId => $userSpace]
registerMounts()
Register mounts for a user to the cache
public
registerMounts(IUser $user, array<string|int, IMountPoint> $mounts[, array<string|int, mixed>|null $mountProviderClasses = null ]) : mixed
Parameters
- $user : IUser
- $mounts : array<string|int, IMountPoint>
- $mountProviderClasses : array<string|int, mixed>|null = null
Tags
remoteStorageMounts()
Remove all cached mounts for a storage
public
remoteStorageMounts(mixed $storageId) : mixed
Parameters
- $storageId : mixed
Tags
removeUserMounts()
Remove all cached mounts for a user
public
removeUserMounts(IUser $user) : mixed
Parameters
- $user : IUser
Tags
removeUserStorageMount()
Remove all mounts for a user and storage
public
removeUserStorageMount(mixed $storageId, string $userId) : mixed
Parameters
- $storageId : mixed
- $userId : string