export interface CachePort { readonly name: string get(key: string): Promise set(key: string, value: T, ttlSeconds?: number): Promise delete(key: string): Promise has(key: string): Promise wrap(key: string, factory: () => Promise, ttlSeconds?: number): Promise } export class CacheError extends Error { readonly adapter: string constructor(message: string, options: { adapter: string; cause?: unknown }) { super(message, { cause: options.cause }) this.name = 'CacheError' this.adapter = options.adapter } }