export type ActiveIndexVersion = { physical_name: string; provider: string; version: number; }; /** * Caches which physical index currently serves reads for every logical index, * since that can change out from under a running process when another * replica finishes seeding and flips it. * * Populated in one bulk fetch rather than one per index: there are never many * search indexes in an app, so listing them all is cheap, and it means * refreshing because of one index refreshes every other one for free. * * Fresh for `SOFT_TTL_MS`. Stale beyond that but still served while a * background refresh runs (stale-while-revalidate) — a failed refresh leaves * `fetchedAt_` untouched, so the age keeps counting from the last *successful* * fetch rather than resetting. Never served past `HARD_TTL_MS` since that last * success; a caller waits on a synchronous refetch instead. */ export declare class ActiveIndexVersionCache { protected readonly fetchAll_: () => Promise>; protected values_: Map; protected fetchedAt_: number; protected refreshing_?: Promise; constructor(fetchAll_: () => Promise>); get(name: string): Promise; protected refresh(): Promise; /** Sets one value directly, e.g. right after this process itself flips it. */ set(name: string, value: ActiveIndexVersion): void; invalidate(): void; } //# sourceMappingURL=active-version-cache.d.ts.map