import { type SyncCache } from "@nodes/types"; export class MemoryRuntimeCache implements SyncCache { private cache: [string, unknown][] = []; size = 50; get(key: string): T | undefined { return this.cache.find(([k]) => k === key)?.[1] as T; } set(key: string, value: T): void { this.cache.push([key, value]); this.cache = this.cache.slice(-this.size); } clear(): void { this.cache = []; } }