Riksdagsmonitor Intelligence Platform โ€” API Documentation - v0.8.42
    Preparing search index...

    Cache for AI analysis results.

    Thread-safety note: Node.js is single-threaded; concurrent async access is fine without additional locking.

    Index

    Constructors

    Properties

    Accessors

    Methods

    Constructors

    Properties

    store: Map<string, CacheEntry> = ...

    Accessors

    Methods

    • Generate a deterministic cache key from analysis inputs.

      Parameters

      • docs: RawDocument[]

        Documents being analysed

      • topic: string

        Focus topic, or null

      • iterations: number

        Number of analysis iterations

      • lang: Language

        Target language

      Returns string

      Cache key string

    • Remove all expired entries from the cache. Called opportunistically from set() to prevent memory growth in long-lived processes. Also enforces a maximum cache size.

      Returns void