diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/Files/Config/UserMountCache.php | 5 | ||||
-rw-r--r-- | lib/public/Files/Config/IUserMountCache.php | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/private/Files/Config/UserMountCache.php b/lib/private/Files/Config/UserMountCache.php index 9cf3b43a431..32bfd5a71f3 100644 --- a/lib/private/Files/Config/UserMountCache.php +++ b/lib/private/Files/Config/UserMountCache.php @@ -409,4 +409,9 @@ class UserMountCache implements IUserMountCache { $result->closeCursor(); return $results; } + + public function clear(): void { + $this->cacheInfoCache = new CappedMemoryCache(); + $this->mountsForUsers = new CappedMemoryCache(); + } } diff --git a/lib/public/Files/Config/IUserMountCache.php b/lib/public/Files/Config/IUserMountCache.php index 9fca98dc843..fde4898bd39 100644 --- a/lib/public/Files/Config/IUserMountCache.php +++ b/lib/public/Files/Config/IUserMountCache.php @@ -117,4 +117,11 @@ interface IUserMountCache { * @since 13.0.0 */ public function getUsedSpaceForUsers(array $users); + + /** + * Clear all entries from the in-memory cache + * + * @since 20.0.0 + */ + public function clear(): void; } |