---
title: "Update Cache Settings"
method: PUT
path: "/data/projects/{projectId}/cache/{cacheId}"
tags: ["Data -- Cache"]
---

# Update Cache Settings

`PUT /data/projects/{projectId}/cache/{cacheId}`

## Request

- Base URL: `https://partner.peaka.studio/api/v1`
- URL: `https://partner.peaka.studio/api/v1/data/projects/{projectId}/cache/{cacheId}`
- Auth: HTTP bearer

Updates the sync schedules of an existing cache. Use this to change how frequently the cache is refreshed.

Only schedule fields are updated; the target table, catalog, and schema cannot be changed after creation. When a schedule is changed, any previously running scheduled workflow for that mode is replaced with the new schedule. Set a schedule's `type` to `NONE` to disable that particular sync mode.

The schedule `expression` uses ISO-8601 duration format (e.g. `PT6H` = every 6 hours, `PT15M` = every 15 minutes, `P1D` = every day).

## Path parameters

- `projectId` string, required
- `cacheId` string, required

## Request body

- CacheSettingsUpdateRequest: This class represents a request to cache data. It contains the catalog ID, schema name, table name, and schedule of the cache request.
  - `incrementalCacheSchedule` Schedule: This class represents a schedule for a cache request. It contains the type and expression of the schedule.
    - `type` string: The type of the schedule. BASIC or NONE.
    - `expression` string: The expression of the schedule. Valid if the type is other than NONE. For BASIC, the expression is a duration in ISO-8601 format. "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
  - `fullRefreshCacheSchedule` Schedule: This class represents a schedule for a cache request. It contains the type and expression of the schedule.
    - `type` string: The type of the schedule. BASIC or NONE.
    - `expression` string: The expression of the schedule. Valid if the type is other than NONE. For BASIC, the expression is a duration in ISO-8601 format. "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)

## Response `200`

Cache settings updated successfully. Returns the updated cache configuration.

## Other responses

- `400`: Invalid request, e.g. the schedule expression is invalid.
- `404`: Cache not found for the given cacheId.

---

[API](https://skmtc.dev/peaka/apis/peaka-gateway-api.md) · [All operations](https://skmtc.dev/peaka/apis/peaka-gateway-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peaka/apis/peaka-gateway-api/revisions/e68b033a22d5?raw)
