This commit is contained in:
mattyatea 2024-04-02 22:51:43 +09:00
parent e56c7782db
commit f6498ebbea
2 changed files with 4 additions and 0 deletions

View file

@ -334,7 +334,9 @@ export class GlobalEventService {
@bindThis
public publishInternalEvent<K extends keyof InternalEventTypes>(type: K, value?: InternalEventTypes[K]): void {
console.time('time GlobalEventService.publishInternalEvent');
this.publish('internal', type, typeof value === 'undefined' ? null : value);
console.timeEnd('time GlobalEventService.publishInternalEvent');
}
@bindThis

View file

@ -33,6 +33,7 @@ export class RedisKVCache<T> {
@bindThis
public async set(key: string, value: T): Promise<void> {
console.time('time RedisKVCache.set');
this.memoryCache.set(key, value);
if (this.lifetime === Infinity) {
await this.redisClient.set(
@ -46,6 +47,7 @@ export class RedisKVCache<T> {
'EX', Math.round(this.lifetime / 1000),
);
}
console.timeEnd('time RedisKVCache.set');
}
@bindThis