are
This commit is contained in:
parent
e56c7782db
commit
f6498ebbea
|
@ -334,7 +334,9 @@ export class GlobalEventService {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public publishInternalEvent<K extends keyof InternalEventTypes>(type: K, value?: InternalEventTypes[K]): void {
|
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);
|
this.publish('internal', type, typeof value === 'undefined' ? null : value);
|
||||||
|
console.timeEnd('time GlobalEventService.publishInternalEvent');
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
|
@ -33,6 +33,7 @@ export class RedisKVCache<T> {
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
public async set(key: string, value: T): Promise<void> {
|
public async set(key: string, value: T): Promise<void> {
|
||||||
|
console.time('time RedisKVCache.set');
|
||||||
this.memoryCache.set(key, value);
|
this.memoryCache.set(key, value);
|
||||||
if (this.lifetime === Infinity) {
|
if (this.lifetime === Infinity) {
|
||||||
await this.redisClient.set(
|
await this.redisClient.set(
|
||||||
|
@ -46,6 +47,7 @@ export class RedisKVCache<T> {
|
||||||
'EX', Math.round(this.lifetime / 1000),
|
'EX', Math.round(this.lifetime / 1000),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
console.timeEnd('time RedisKVCache.set');
|
||||||
}
|
}
|
||||||
|
|
||||||
@bindThis
|
@bindThis
|
||||||
|
|
Loading…
Reference in New Issue