import * as solutionCacheService from '../services/solutionCache.service.js'; // DB-backed SolutionStore using the solution_cache table (JSONB column, auto-parsed by pg driver) export const DbSolutionStore = { async get(key: string) { const [result] = await solutionCacheService.batchGet([key]); return result ?? null; }, async set(key: string, val: any) { try { await solutionCacheService.set(key, val); } catch (err) { console.error('[DbSolutionStore] set failed (non-fatal):', (err as Error).message); } }, async batchGet(keys: string[]) { return solutionCacheService.batchGet(keys); }, };