Service for warming title normalization caches off-thread. Maintains canonical caches on the main thread and applies worker deltas.

Constructors

Methods

  • Get normalized title from cache. Falls back to main-thread normalization if not cached.

    Parameters

    • title: string

      Title to lookup

    • algorithm: CacheNormalizationKey

      Normalization algorithm to use

    • normalizer: (title: string) => string

      Fallback normalizer function

    Returns string

    Normalized title

  • Preload a batch of titles into the cache synchronously. Stores directly to cache without worker processing.

    Parameters

    • titles: string[]

      Titles to preload

    • algorithm: CacheNormalizationKey

      Algorithm to use for preload

    • normalizer: (title: string) => string

      Normalizer function

    Returns void