diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/base.php | 1 | ||||
-rw-r--r-- | lib/l10n/zh_CN.js | 4 | ||||
-rw-r--r-- | lib/l10n/zh_CN.json | 4 | ||||
-rw-r--r-- | lib/private/User/DisplayNameCache.php | 6 |
4 files changed, 11 insertions, 4 deletions
diff --git a/lib/base.php b/lib/base.php index a603f67d78e..ab838d366b1 100644 --- a/lib/base.php +++ b/lib/base.php @@ -243,6 +243,7 @@ class OC { // render error page $template = Server::get(ITemplateManager::class)->getTemplate('', 'update.user', 'guest'); \OCP\Util::addScript('core', 'maintenance'); + \OCP\Util::addScript('core', 'common'); \OCP\Util::addStyle('core', 'guest'); $template->printPage(); die(); diff --git a/lib/l10n/zh_CN.js b/lib/l10n/zh_CN.js index bb1294601aa..5b78898b2db 100644 --- a/lib/l10n/zh_CN.js +++ b/lib/l10n/zh_CN.js @@ -1,7 +1,7 @@ OC.L10N.register( "lib", { - "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!", + "Cannot write into \"config\" directory!" : "无法写入“config”目录!", "This can usually be fixed by giving the web server write access to the config directory." : "通常可以为 Web 服务器授予对 config 目录的写入权限来修复这个问题。", "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果您更希望将 config.php 文件设为只读,可以将 \"config_is_read_only\" 选项设置为 true。", "See %s" : "查看 %s", @@ -129,6 +129,8 @@ OC.L10N.register( "Settings" : "设置", "Log out" : "注销", "Accounts" : "账号", + "Bluesky" : "Bluesky", + "View %s on Bluesky" : "在 Bluesky 上查看 %s", "Email" : "电子邮箱", "Mail %s" : "发邮件给 %s", "Fediverse" : "联邦宇宙", diff --git a/lib/l10n/zh_CN.json b/lib/l10n/zh_CN.json index 28e3497decd..857e1ced95b 100644 --- a/lib/l10n/zh_CN.json +++ b/lib/l10n/zh_CN.json @@ -1,5 +1,5 @@ { "translations": { - "Cannot write into \"config\" directory!" : "无法写入 \"config\" 目录!", + "Cannot write into \"config\" directory!" : "无法写入“config”目录!", "This can usually be fixed by giving the web server write access to the config directory." : "通常可以为 Web 服务器授予对 config 目录的写入权限来修复这个问题。", "But, if you prefer to keep config.php file read only, set the option \"config_is_read_only\" to true in it." : "但是,如果您更希望将 config.php 文件设为只读,可以将 \"config_is_read_only\" 选项设置为 true。", "See %s" : "查看 %s", @@ -127,6 +127,8 @@ "Settings" : "设置", "Log out" : "注销", "Accounts" : "账号", + "Bluesky" : "Bluesky", + "View %s on Bluesky" : "在 Bluesky 上查看 %s", "Email" : "电子邮箱", "Mail %s" : "发邮件给 %s", "Fediverse" : "联邦宇宙", diff --git a/lib/private/User/DisplayNameCache.php b/lib/private/User/DisplayNameCache.php index 40e1c752589..4321d95f88e 100644 --- a/lib/private/User/DisplayNameCache.php +++ b/lib/private/User/DisplayNameCache.php @@ -25,6 +25,8 @@ use OCP\User\Events\UserDeletedEvent; * @template-implements IEventListener<UserChangedEvent|UserDeletedEvent> */ class DisplayNameCache implements IEventListener { + private const CACHE_TTL = 24 * 60 * 60; // 1 day + private array $cache = []; private ICache $memCache; private IUserManager $userManager; @@ -56,7 +58,7 @@ class DisplayNameCache implements IEventListener { $displayName = null; } $this->cache[$userId] = $displayName; - $this->memCache->set($userId, $displayName, 60 * 10); // 10 minutes + $this->memCache->set($userId, $displayName, self::CACHE_TTL); return $displayName; } @@ -71,7 +73,7 @@ class DisplayNameCache implements IEventListener { $userId = $event->getUser()->getUID(); $newDisplayName = $event->getValue(); $this->cache[$userId] = $newDisplayName; - $this->memCache->set($userId, $newDisplayName, 60 * 10); // 10 minutes + $this->memCache->set($userId, $newDisplayName, self::CACHE_TTL); } if ($event instanceof UserDeletedEvent) { $userId = $event->getUser()->getUID(); |