---
title: "PUT /api/cache"
method: PUT
path: "/api/cache"
tags: ["/api/cache"]
---

# PUT /api/cache

`PUT /api/cache`

Store cache configuration.

## Request body

- object
  - `model` 'root' | 'database' | 'dashboard' | 'question', required
  - `model_id` integer, required — value must be an integer greater or equal to than zero.
  - `strategy` union, required
    - union
      - object — Schema for a caching strategy in EE when we have an premium token with `:cache-granular-controls`.
        - `type` 'nocache', required
      - object — Schema for a caching strategy in EE when we have an premium token with `:cache-granular-controls`.
        - `type` 'ttl', required
        - `min_duration_ms` integer, required — value must be an integer greater or equal to than zero.
        - `multiplier` integer, required — value must be an integer greater than zero.
      - object — Schema for a caching strategy in EE when we have an premium token with `:cache-granular-controls`.
        - `type` 'duration', required
        - `duration` integer, required — value must be an integer greater than zero.
        - `refresh_automatically` boolean, nullable
        - `unit` 'hours' | 'minutes' | 'seconds' | 'days', required
      - object — Schema for a caching strategy in EE when we have an premium token with `:cache-granular-controls`.
        - `type` 'schedule', required
        - `refresh_automatically` boolean, nullable
        - `schedule` string, required — value must be a valid Quartz cron schedule string.
    - union
      - object — Schema for a caching strategy (OSS)
        - `type` 'nocache', required
      - object — Schema for a caching strategy (OSS)
        - `type` 'ttl', required
        - `min_duration_ms` integer, required — value must be an integer greater or equal to than zero.
        - `multiplier` integer, required — value must be an integer greater than zero.

## Response `2XX`

Successful response

- MetabaseCacheApiCacheConfigStoreResponse
  - `id` integer, required — value must be an integer greater than zero.

## Other responses

- `4XX` — Client error response
- `5XX` — Server error response

## Changes

> 13 revisions in range; 1 could not be searched.

- **2026-05-22** `b1dc4ea67567` — 1 info
  - added the media type `application/json` for the response with the status `2XX`
- **2026-03-09** `78297d193ca4` — 1 breaking, 1 info
  - api path removed without deprecation
  - endpoint added

[Change history](https://skmtc.dev/metabase/apis/metabase-api/changes/api/cache/put.md)

---

[API](https://skmtc.dev/metabase/apis/metabase-api.md) · [All operations](https://skmtc.dev/metabase/apis/metabase-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/metabase/metabase-api/revisions/e879e0319b12/schema)
