Nest.js node-cache 라이브러리 적용


Nest.js  node-cache 라이브러리 적용

휴대폰 인증같이 간단한 처리는 캐시에 데이터를 넣어 처리 가능하다. 간단하게 캐시데이터 get / set 코드 import { Injectable } from '@nestjs/common'; import NodeCache from 'node-cache'; @Injectable() export class AuthCache { private cache: NodeCache; constructor() { this.cache = new NodeCache(); } async createCache(params : any) { let { props } = params let { mobileNo, authNo } = props const cacheKey = mobileNo; // 캐시 키 const chcheValue ..


원문링크 : Nest.js node-cache 라이브러리 적용