From ac2999a26a4ea8677ade7bc2b6f6d4ab968f1c36 Mon Sep 17 00:00:00 2001 From: Julius Härtl Date: Fri, 31 Jul 2020 11:10:48 +0200 Subject: Transfer shares of the transferred root node MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- lib/private/Files/Config/UserMountCache.php | 5 +++++ lib/public/Files/Config/IUserMountCache.php | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'lib') 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; } -- cgit v1.2.3