Logos DX
    Preparing search index...

    Class CachePolicy<S, H, P>

    Cache policy for storing and retrieving response data.

    Supports stale-while-revalidate (SWR) pattern where stale cached data is returned immediately while fresh data is fetched in the background.

    Type Parameters

    • S = unknown

      Instance state type

    • H = unknown

      Headers type

    • P = unknown

      Params type

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    config: CacheConfig<S, H, P> | null = null
    state: CachePolicyState<S, H, P> | null = null

    Extended state with cache-specific fields.

    Accessors

    Methods

    • Compute rule configuration for a method+path combination.

      This is the expensive O(n) operation that gets memoized. Finds matching rule and merges with policy defaults.

      Parameters

      • method: string

        HTTP method (uppercase)

      • path: string

        Request path

      Returns CacheRule<S, H, P> | null

      Computed rule or null if disabled