Libraries v5.0.0
    Preparing search index...

    Function computeCacheKey

    • Compute a versioned, deterministic key from a tag and selected request values.

      Format: ct2: followed by JSON [tagName, [[property, encodedValue], ...]]. Properties and object keys are sorted by code units. Values are type-tagged; Dates retain millisecond precision. Missing/undefined selected properties are omitted. Even property-free tags use this format; base invalidation labels remain the original names. All cache writers/invalidators must use the same version and retire old entries when upgrading.

      Parameters

      • tag: CacheTagDefinition
      • root: {
            body: unknown;
            headers: Record<string, string>;
            params: Record<string, unknown>;
            query: Record<string, unknown>;
        }

      Returns string

      TypeError for cyclic values, invalid dates, functions, symbols, accessor properties, or objects other than arrays, dates and plain objects.