- Add Legal Office of the Master seal (SVG design with Maltese Cross, scales of justice, legal scroll) - Create legal-office-manifest-template.json for Legal Office credentials - Update SEAL_MAPPING.md and DESIGN_GUIDE.md with Legal Office seal documentation - Complete Azure CDN infrastructure deployment: - Resource group, storage account, and container created - 17 PNG seal files uploaded to Azure Blob Storage - All manifest templates updated with Azure URLs - Configuration files generated (azure-cdn-config.env) - Add comprehensive Azure CDN setup scripts and documentation - Fix manifest URL generation to prevent double slashes - Verify all seals accessible via HTTPS
33 lines
1.3 KiB
TypeScript
33 lines
1.3 KiB
TypeScript
/**
|
|
* 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
|