chore(server): remove too verbose logs (#5555)

chore(server): remove too verbose logs

chore(server): make logs less verbose
This commit is contained in:
liuyi 2024-01-17 10:37:22 +00:00
parent 00acc49342
commit bf88b6edaa
No known key found for this signature in database
GPG Key ID: 56709255DC7EC728

View File

@ -40,9 +40,9 @@ export class CacheInterceptor implements NestInterceptor {
);
if (preventKey) {
this.logger.debug(`prevent cache: ${JSON.stringify(preventKey)}`);
const key = await this.getCacheKey(ctx, preventKey);
if (key) {
this.logger.debug(`cache ${key} staled`);
await this.cache.delete(key);
}
@ -60,12 +60,12 @@ export class CacheInterceptor implements NestInterceptor {
const cachedData = await this.cache.get(cacheKey);
if (cachedData) {
this.logger.debug('cache hit', cacheKey, cachedData);
this.logger.debug(`cache ${cacheKey} hit`);
return of(cachedData);
} else {
this.logger.debug(`cache ${cacheKey} miss`);
return next.handle().pipe(
mergeMap(async result => {
this.logger.debug('cache miss', cacheKey, result);
await this.cache.set(cacheKey, result);
return result;