( workspaceId: string, serverMap: Record<string, ServerStatusInfo> )
| 35 | |
| 36 | // Helper function to save server map to cache |
| 37 | async function saveServerMapToCache( |
| 38 | workspaceId: string, |
| 39 | serverMap: Record<string, ServerStatusInfo> |
| 40 | ): Promise<void> { |
| 41 | const cacheManager = await getCacheManager(); |
| 42 | const key = getServerMapCacheKey(workspaceId); |
| 43 | |
| 44 | try { |
| 45 | await cacheManager.set(key, JSON.stringify(serverMap)); |
| 46 | } catch (err) { |
| 47 | logger.error('[ServerStatus] Error saving server map to cache:', err); |
| 48 | } |
| 49 | } |
| 50 | |
| 51 | // Helper function to get cache key for server history |
| 52 | function getServerHistoryCacheKey(workspaceId: string, name: string): string { |
no test coverage detected