warframe-nexus-query
    Preparing search index...

    Version-based cache system for Warframe Market API v2 Uses version hashes from /v2/versions endpoint to invalidate cache Backs up to persistent storage using flat-cache

    Index
    maxSize: number
    ttl: number
    • Get item from cache or fetch it

      Type Parameters

      • T

      Parameters

      • key: string

        Cache key

      • collection: string | undefined

        Collection name (items, rivens, etc.)

      • fetchFn: () => Promise<T>

        Function to fetch data if cache miss

      Returns Promise<T>

      Cached or freshly fetched value

    • Check if key exists in cache (and is valid)

      Parameters

      • key: string

        Cache key

      Returns boolean

      Whether the key is present and unexpired

    • Refresh cache entry

      Type Parameters

      • T

      Parameters

      • key: string

        Cache key

      • collection: string

        Collection name

      • fetchFn: () => Promise<T>

        Function to fetch fresh data

      Returns Promise<T>

      Fresh value

    • Set item in cache

      Type Parameters

      • T

      Parameters

      • key: string

        Cache key

      • value: T

        Value to cache

      • Optionalcollection: string

        Collection name for version tracking

      Returns void

    • Check if collection should be refreshed

      Parameters

      • collection: string

        Collection name

      Returns Promise<boolean>

      Whether the cached collection version is stale