/** * Database query caching with Redis * Implements query result caching with automatic invalidation * * Note: This module uses optional dynamic import for @the-order/cache * to avoid requiring it as a direct dependency. If cache is not available, * queries will execute directly without caching. */ import type { QueryResult, QueryResultRow } from './client'; export interface CacheOptions { ttl?: number; keyPrefix?: string; enabled?: boolean; } /** * Execute a query with caching */ export declare function cachedQuery(sql: string, params?: unknown[], options?: CacheOptions): Promise>; /** * Invalidate cache for a pattern */ export declare function invalidateCache(pattern: string): Promise; /** * Invalidate cache for a specific query */ export declare function invalidateQueryCache(sql: string, params?: unknown[]): Promise; /** * Cache decorator for database functions * Note: This is a simplified implementation. In production, you'd need to * extract SQL and params from the function or pass them as metadata. */ export declare function cached Promise>>(fn: T): T; //# sourceMappingURL=query-cache.d.ts.map