CachableResponse
Overview
Remarks
Etag caching is supported when CachableResponse
is constructed with the needed parameters.
You may want to disable caching in your browser development tools to avoid this behavior while debugging.
Usage
- Node
- Deno
- Browser/ESM
import { CachableResponse } from 'keywork/http/classes'
import { CachableResponse } from 'https://deno.land/x/keywork/http/classes'
let { CachableResponse } = await import('https://esm.sh/keywork/http/classes')
Hierarchy
Response
↳
CachableResponse
↳↳
HTMLResponse
↳↳
JSONResponse
Constructors
constructor
new CachableResponse
(body, request?, etag?, cacheControlOptions?, headersInit?)
Parameters
Name | Type | Description |
---|---|---|
body | null | BodyInit |
request? | Request | |
etag? | null | string |
cacheControlOptions? | Partial<[ CacheControlDirectives](/modules/http/headers/caching/interfaces/CacheControlDirectives)> | |
headersInit? | HeadersInit |
Overrides
Response.constructor
Defined in
http/classes/CachableResponse.ts:29
A client-side cachable response.