chore(server): remove too verbose logs (#5555)
chore(server): remove too verbose logs chore(server): make logs less verbose
This commit is contained in:
@@ -40,9 +40,9 @@ export class CacheInterceptor implements NestInterceptor {
|
|||||||
);
|
);
|
||||||
|
|
||||||
if (preventKey) {
|
if (preventKey) {
|
||||||
this.logger.debug(`prevent cache: ${JSON.stringify(preventKey)}`);
|
|
||||||
const key = await this.getCacheKey(ctx, preventKey);
|
const key = await this.getCacheKey(ctx, preventKey);
|
||||||
if (key) {
|
if (key) {
|
||||||
|
this.logger.debug(`cache ${key} staled`);
|
||||||
await this.cache.delete(key);
|
await this.cache.delete(key);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -60,12 +60,12 @@ export class CacheInterceptor implements NestInterceptor {
|
|||||||
const cachedData = await this.cache.get(cacheKey);
|
const cachedData = await this.cache.get(cacheKey);
|
||||||
|
|
||||||
if (cachedData) {
|
if (cachedData) {
|
||||||
this.logger.debug('cache hit', cacheKey, cachedData);
|
this.logger.debug(`cache ${cacheKey} hit`);
|
||||||
return of(cachedData);
|
return of(cachedData);
|
||||||
} else {
|
} else {
|
||||||
|
this.logger.debug(`cache ${cacheKey} miss`);
|
||||||
return next.handle().pipe(
|
return next.handle().pipe(
|
||||||
mergeMap(async result => {
|
mergeMap(async result => {
|
||||||
this.logger.debug('cache miss', cacheKey, result);
|
|
||||||
await this.cache.set(cacheKey, result);
|
await this.cache.set(cacheKey, result);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
|
|||||||
Reference in New Issue
Block a user