import { HealthIndicator, HealthIndicatorResult } from '@nestjs/terminus'; import { Cache } from 'cache-manager'; export declare class CacheHealthIndicator extends HealthIndicator { private cacheManager; constructor(cacheManager: Cache); /** * Checks the health status of a specified service. * * @param {string} key - The service key to check (e.g., 'cache'). * @returns {Promise} - A promise resolving to the health check result. * * @throws {HealthCheckError} - Throws an error if the health check fails. * * @description * This method verifies the health of the cache system by attempting to set and retrieve a test key. * If the cache system is enabled (Redis or in-memory), it ensures that data can be stored and retrieved successfully. * If the health check fails, it throws a `HealthCheckError`. * * @example * ```ts * const isCacheHealthy = await healthService.isHealthy('cache'); * console.log(isCacheHealthy); * ``` */ isHealthy(key: string): Promise; }