File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed
Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -70,7 +70,7 @@ export interface ICache {
7070 /**
7171 * 캐시 서버와 연결을 끊습니다.
7272 */
73- disconnect ( ) : Promise < void > ;
73+ destroy ( ) : Promise < void > ;
7474
7575 /**
7676 * 캐시 서버와 연결되어 있는지 확인합니다.
Original file line number Diff line number Diff line change @@ -71,15 +71,15 @@ export class RedisCache implements ICache {
7171 }
7272 }
7373
74- async disconnect ( ) : Promise < void > {
74+ async destroy ( ) : Promise < void > {
7575 try {
7676 if ( this . connected ) {
77- await this . client . disconnect ( ) ;
77+ this . client . destroy ( ) ;
7878 this . connected = false ;
7979 logger . info ( 'Redis cache connection closed' ) ;
8080 }
8181 } catch ( error ) {
82- logger . error ( 'Failed to disconnect from Redis cache:' , error ) ;
82+ logger . error ( 'Failed to destroy from Redis cache:' , error ) ;
8383 throw error ;
8484 }
8585 }
@@ -153,6 +153,7 @@ export class RedisCache implements ICache {
153153 async exists ( key : string ) : Promise < boolean > {
154154 try {
155155 if ( ! this . connected ) {
156+ logger . warn ( 'Redis not connected, skipping cache exists' ) ;
156157 return false ;
157158 }
158159
@@ -206,6 +207,7 @@ export class RedisCache implements ICache {
206207 async size ( ) : Promise < number > {
207208 try {
208209 if ( ! this . connected ) {
210+ logger . warn ( 'Redis not connected, skipping cache size, return 0' ) ;
209211 return 0 ;
210212 }
211213
You can’t perform that action at this time.
0 commit comments