import type { DatabaseInterface } from '@happyvertical/sql'; import type { ExplainedObjectFieldPolicy } from './types.js'; export declare function getFieldPolicyCacheTtlMs(): number; export declare function getCachedFieldPolicy(objectRef: string, tenantId: string | null | undefined, userId: string | null | undefined, db: DatabaseInterface | unknown, hierarchyLoader?: unknown): ExplainedObjectFieldPolicy | null; export declare function setCachedFieldPolicy(objectRef: string, tenantId: string | null | undefined, userId: string | null | undefined, db: DatabaseInterface | unknown, value: ExplainedObjectFieldPolicy, hierarchyLoader?: unknown): void; /** * Drop every cached resolution for `(db, objectRef)`. * * Deliberately coarser than the prompts precedent (which deletes a single * `(key, tenantId)` entry when the tenant is known): tenant HIERARCHY makes a * parent-tenant row change affect every descendant tenant's resolution, and a * lock or app-row change affects user-tier entries too, so precise * invalidation would have to know the whole tenant tree. Per-objectRef prefix * invalidation is always correct and the 30s TTL keeps the cost bounded. */ export declare function invalidateFieldPolicyCache(objectRef: string, db: DatabaseInterface | unknown): void; export declare function clearFieldPolicyCache(): void; //# sourceMappingURL=cache.d.ts.map