prorm API Reference
    Preparing search index...

    Interface PreparedStatementCacheOptions

    Options for prepared statement cache

    interface PreparedStatementCacheOptions {
        maxSize: number;
        ttl?: number;
        normalizeSql?: boolean;
        onCache?: (key: string, statement: CachedStatement) => void;
        onEvict?: (key: string, statement: CachedStatement) => void;
        logging?: boolean;
    }
    Index
    maxSize: number

    Maximum number of statements to cache

    ttl?: number

    Time-to-live in milliseconds for cached statements

    normalizeSql?: boolean

    Whether to cache based on normalized SQL (with placeholders)

    onCache?: (key: string, statement: CachedStatement) => void

    Callback when a statement is cached

    onEvict?: (key: string, statement: CachedStatement) => void

    Callback when a statement is evicted

    logging?: boolean

    Whether to log cache operations