(key: string)
| 190 | } |
| 191 | |
| 192 | public async exists(key: string): Promise<boolean> { |
| 193 | const client = this.getClient(); |
| 194 | if (!client) return false; |
| 195 | |
| 196 | try { |
| 197 | const result = await client.exists(key); |
| 198 | return result === 1; |
| 199 | } catch (error) { |
| 200 | logger.error(`REDIS_MANAGER: Error checking Redis key ${key}:`, error); |
| 201 | return false; |
| 202 | } |
| 203 | } |
| 204 | |
| 205 | public async expire(key: string, ttl: number): Promise<boolean> { |
| 206 | const client = this.getClient(); |