/** * postgres-mcp — Adapter Metadata Cache * * TTL-based in-memory cache for schema metadata (table descriptions, * index lists). Extracted from `postgres-adapter.ts` to keep that file * under the 500-line target. * * Exported helpers are used exclusively by `PostgresAdapter`. */ export declare const DEFAULT_CACHE_TTL_MS: number; /** * Metadata cache entry with TTL support. */ export interface CacheEntry { data: T; timestamp: number; } export type MetadataCache = Map>; /** * Retrieve a cached value if it has not yet expired. * Returns `undefined` on a cache miss or TTL expiry. */ export declare function getCached(cache: MetadataCache, key: string, ttlMs: number): unknown; /** * Store a value in the metadata cache with the current timestamp. */ export declare function setCache(cache: MetadataCache, key: string, data: unknown): void; /** * Invalidate cached metadata for a specific table. * Called after DDL operations that change table structure. */ export declare function invalidateTableCache(cache: MetadataCache, tableName: string, schemaName?: string): void; /** * Invalidate all schema-related metadata caches. * Used when the specific affected table cannot be determined. */ export declare function invalidateSchemaCache(cache: MetadataCache): void; /** * Detect DDL statements and invalidate the appropriate cache entries. * Extracts the table name from common DDL patterns; falls back to * full schema cache invalidation for ambiguous statements. */ export declare function invalidateCacheForDdl(cache: MetadataCache, sql: string): void; //# sourceMappingURL=adapter-cache.d.ts.map