European Parliament MCP Server API - v1.4.23
    Preparing search index...

    Module utils/weeklyCacheState

    Adaptive (incremental) weekly-cache loading primitives.

    These helpers let the weekly cache generators resume from whatever detail records were already fetched in a prior run instead of starting over every time. They keep side effects explicit (state mutation is limited to the caller-provided details map and missingIds set, and I/O is limited to the injected fetchDetail callback), which keeps fetch orchestration unit-testable without hitting the European Parliament Open Data API.

    DetailBatchOptions
    DetailBatchResult
    IncrementalDetailState
    cacheDetail
    compactDetailMap
    hasCachedDetail
    pruneMissingIds
    readIncrementalDetailState
    refreshDetailBatch