diff options
| author | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-07 18:15:47 +0900 |
|---|---|---|
| committer | syuilo <Syuilotan@yahoo.co.jp> | 2023-04-07 18:15:47 +0900 |
| commit | 6e1ae7b2426fc5729f410a52db1c0b8adcc69d36 (patch) | |
| tree | 453bdf56fa7871c19521e57d2fa9d27d1e6feb26 /packages/backend | |
| parent | Merge branch 'develop' of https://github.com/misskey-dev/misskey into develop (diff) | |
| download | misskey-6e1ae7b2426fc5729f410a52db1c0b8adcc69d36.tar.gz misskey-6e1ae7b2426fc5729f410a52db1c0b8adcc69d36.tar.bz2 misskey-6e1ae7b2426fc5729f410a52db1c0b8adcc69d36.zip | |
enhance(backend): tweak cache of role
#10439
Diffstat (limited to 'packages/backend')
| -rw-r--r-- | packages/backend/src/core/RoleService.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packages/backend/src/core/RoleService.ts b/packages/backend/src/core/RoleService.ts index 3379f5af8b..c8ebe1adb7 100644 --- a/packages/backend/src/core/RoleService.ts +++ b/packages/backend/src/core/RoleService.ts @@ -84,8 +84,8 @@ export class RoleService implements OnApplicationShutdown { ) { //this.onMessage = this.onMessage.bind(this); - this.rolesCache = new MemorySingleCache<Role[]>(Infinity); - this.roleAssignmentByUserIdCache = new MemoryKVCache<RoleAssignment[]>(Infinity); + this.rolesCache = new MemorySingleCache<Role[]>(1000 * 60 * 60 * 1); + this.roleAssignmentByUserIdCache = new MemoryKVCache<RoleAssignment[]>(1000 * 60 * 60 * 1); this.redisForPubsub.on('message', this.onMessage); } |