GeoLeaf Core API - v3.0.0
    Preparing search index...
    • Publishes the ceiling where the Service Worker can read it.

      🛑 IT WRITES EVEN WHEN NOTHING IS DECLARED, and that is the point. Skipping the write on null would leave a PREVIOUS value in place: a profile that declared 500, then dropped the key, would keep being trimmed at 500 with nothing in its configuration saying so — and the next reader would have no way of telling a deliberate ceiling from a leftover. Publishing null states "this profile declares nothing", and the worker falls back to its own constant. Same reasoning as publishDataOrigins, whose empty array is a REFUSAL rather than a silence.

      A storage failure is logged, never thrown: a profile still has to load when persistence is unavailable, and the worker has a bounding fallback either way.

      Parameters

      • db:
            | { setPreference?: (key: string, value: unknown) => Promise<unknown> }
            | null
            | undefined

        The storage façade (GeoLeaf.Storage.DB).

      • maxEntries: number | null

        Ceiling in entries, or null when the profile declares none.

      Returns Promise<void>

      Resolves once written (or once the write has been given up on).

      await publishTileCacheBudget(GeoLeaf?.Storage?.DB, 2000);