---
title: "`/cache/:n` — returns `200` with `Cache-Control: public, max-age=n`."
url: "https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8/operations/cache_seconds_handler"
---

> Full API specification: https://developer.rucho.org/apis/rucho/versions/5bdf1bcb-8db4-40f1-a293-72c7198e26c8.md

# `/cache/:n` — returns `200` with `Cache-Control: public, max-age=n`.

`GET` `/cache/{n}`

Operation ID: `cache_seconds_handler`

## Path parameters

- `n` (integer, int64, required) - max-age in seconds

## Responses

- `200` - JSON echo with Cache-Control: public, max-age=n

## OpenAPI definition

```yaml
openapi: 3.0.3
info:
  title: rucho
  version: 1.6.0
servers:
  - url: https://rucho.org
    description: Production (EKS us-east-2, behind Kong)
paths:
  /cache/{n}:
    get:
      tags:
        - crate::routes::cache
      summary: "`/cache/:n` — returns `200` with `Cache-Control: public, max-age=n`."
      operationId: cache_seconds_handler
      parameters:
        - name: n
          in: path
          description: max-age in seconds
          required: true
          schema:
            type: integer
            format: int64
            minimum: 0
      responses:
        "200":
          description: "JSON echo with Cache-Control: public, max-age=n"
```
