Merge pull request #43996 from nextcloud/feat/store-last-known-quota-usage

feat: Store last known quota usage for a user
This commit is contained in:
Côme Chilliet 2024-03-07 10:29:04 +01:00 committed by GitHub
commit 7033967115
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -596,6 +596,11 @@ class OC_Helper {
'mountPoint' => trim($mountPoint, '/'),
];
if ($ownerId && $path === '/') {
// If path is root, store this as last known quota usage for this user
\OCP\Server::get(\OCP\IConfig::class)->setUserValue($ownerId, 'files', 'lastSeenQuotaUsage', (string)$relative);
}
$memcache->set($cacheKey, $info, 5 * 60);
return $info;