Setu-TS
    Preparing search index...

    Function assessCacheability

    • Lists every reason the edge cache would refuse this response.

      Exported because it is the one honest way to ask "would the edge cache this?" without attempting a write and catching the rejection.

      The 206 and Vary: * checks are unconditional, evaluated independently of cacheableStatuses: an operator can legitimately configure [200, 206], at which point the status check passes and only the explicit 206 rule stops the platform from throwing.

      Parameters

      • input: CacheabilityInput

        The request method, response status, headers, and the caller's cacheable-status set

      Returns readonly CacheRefusal[]

      Every refusal that applies; empty when the response is cacheable

      const refusals = assessCacheability({
      method: 'GET',
      status: 200,
      headers: new Headers({ 'set-cookie': 'a=1' }),
      cacheableStatuses: [200],
      });
      // → ['set-cookie']

      0.2.0