/**
 * 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<T extends QueryResultRow = QueryResultRow>(sql: string, params?: unknown[], options?: CacheOptions): Promise<QueryResult<T>>;
/**
 * Invalidate cache for a pattern
 */
export declare function invalidateCache(pattern: string): Promise<number>;
/**
 * Invalidate cache for a specific query
 */
export declare function invalidateQueryCache(sql: string, params?: unknown[]): Promise<void>;
/**
 * 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<T extends (...args: unknown[]) => Promise<QueryResult<QueryResultRow>>>(fn: T): T;
//# sourceMappingURL=query-cache.d.ts.map