---
title: "Set cache control header"
method: GET
path: "/kitchen-sink/response/cache/{timeToLive}/{cacheResponseDirective}"
tags: ["🚰 Kitchen Sink"]
---

# Set cache control header

`GET /kitchen-sink/response/cache/{timeToLive}/{cacheResponseDirective}`

- `Cache-control` is an HTTP header used to specify browser caching policies in both client requests and server responses.
    

- Policies include how a resource is cached, where it’s cached and its maximum age before expiring (i.e., time to live)
    

_For example,_

`cache-control: max-age=120` means that the returned resource is valid for **120** seconds, after which the browser has to request a newer version.

- The `public` (cacheResponseDirective) response directive indicates that a resource can be cached by any cache.  
    
- The `private` (cacheResponseDirective) response directive indicates that a resource is user specific - it can still be cached, but only on a client device. For example, a web page response marked as private can be cached by a desktop browser, but not a content delivery network (CDN).

## Response `200`

Set cache control header

- object
  - `data` object
    - `headers` object
      - `access-control-allow-credentials` string
      - `access-control-allow-origin` string
      - `cache-control` string
      - `x-powered-by` string
  - `message` string
  - `statusCode` number
  - `success` boolean

---

[API](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi.md) · [All operations](https://skmtc.net/hiteshchoudhary-ssesph/apis/freeapi/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/hiteshchoudhary-ssesph/freeapi/versions/a9f3a290e4dc/schema)
