import { ICacheManager } from "../types.js"; export class MockCacheManager implements ICacheManager { private cache = new Map(); async get(key: string): Promise { const value = this.cache.get(key); return value as T | undefined; } async set(key: string, value: T, ttlSeconds: number): Promise { this.cache.set(key, value); if (ttlSeconds > 0) { setTimeout(() => this.cache.delete(key), ttlSeconds * 1000); } } async delete(key: string): Promise { this.cache.delete(key); } async clear(): Promise { this.cache.clear(); } }