Remove the controller-level cache from MatchGrpcController
This commit is contained in:
parent
0446d267ef
commit
c51c368d83
|
@ -5,14 +5,7 @@ import { MatchQuery } from '@modules/ad/core/application/queries/match/match.que
|
||||||
import { MatchingResult } from '@modules/ad/core/application/queries/match/match.query-handler';
|
import { MatchingResult } from '@modules/ad/core/application/queries/match/match.query-handler';
|
||||||
import { MatchEntity } from '@modules/ad/core/domain/match.entity';
|
import { MatchEntity } from '@modules/ad/core/domain/match.entity';
|
||||||
import { MatchMapper } from '@modules/ad/match.mapper';
|
import { MatchMapper } from '@modules/ad/match.mapper';
|
||||||
import { CacheInterceptor, CacheKey } from '@nestjs/cache-manager';
|
import { Controller, Inject, UseFilters, UsePipes } from '@nestjs/common';
|
||||||
import {
|
|
||||||
Controller,
|
|
||||||
Inject,
|
|
||||||
UseFilters,
|
|
||||||
UseInterceptors,
|
|
||||||
UsePipes,
|
|
||||||
} from '@nestjs/common';
|
|
||||||
import { QueryBus } from '@nestjs/cqrs';
|
import { QueryBus } from '@nestjs/cqrs';
|
||||||
import { GrpcMethod } from '@nestjs/microservices';
|
import { GrpcMethod } from '@nestjs/microservices';
|
||||||
import { LogCauseExceptionFilter } from '@src/log-cause.exception-filter';
|
import { LogCauseExceptionFilter } from '@src/log-cause.exception-filter';
|
||||||
|
@ -35,8 +28,6 @@ export class MatchGrpcController {
|
||||||
private readonly matchMapper: MatchMapper,
|
private readonly matchMapper: MatchMapper,
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
@CacheKey('MatcherServiceMatch')
|
|
||||||
@UseInterceptors(CacheInterceptor)
|
|
||||||
@GrpcMethod('MatcherService', 'Match')
|
@GrpcMethod('MatcherService', 'Match')
|
||||||
async match(data: MatchRequestDto): Promise<MatchingPaginatedResponseDto> {
|
async match(data: MatchRequestDto): Promise<MatchingPaginatedResponseDto> {
|
||||||
const matchingResult: MatchingResult = await this.queryBus.execute(
|
const matchingResult: MatchingResult = await this.queryBus.execute(
|
||||||
|
|
Loading…
Reference in New Issue