enhance(backend): tweak cache of role

#10439
This commit is contained in:
syuilo 2023-04-07 18:15:47 +09:00
parent 930724f9de
commit 6e1ae7b242
1 changed files with 2 additions and 2 deletions

View File

@ -84,8 +84,8 @@ export class RoleService implements OnApplicationShutdown {
) { ) {
//this.onMessage = this.onMessage.bind(this); //this.onMessage = this.onMessage.bind(this);
this.rolesCache = new MemorySingleCache<Role[]>(Infinity); this.rolesCache = new MemorySingleCache<Role[]>(1000 * 60 * 60 * 1);
this.roleAssignmentByUserIdCache = new MemoryKVCache<RoleAssignment[]>(Infinity); this.roleAssignmentByUserIdCache = new MemoryKVCache<RoleAssignment[]>(1000 * 60 * 60 * 1);
this.redisForPubsub.on('message', this.onMessage); this.redisForPubsub.on('message', this.onMessage);
} }