Update Cache Settings
Endpoint
PATCH /apiops/projects/{projectName}/apiProxies/{apiProxyName}/settings/cache/
Authentication
Requires a Personal API Access Token.
Header
Authorization: Bearer YOUR_TOKEN
Request
Headers
| Header | Value | Required |
|---|---|---|
| Authorization | Bearer {token} | Yes |
| Content-Type | application/json | Yes |
Path Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| projectName | string | Yes | Project name |
| apiProxyName | string | Yes | API Proxy name |
Request Body
Full JSON Body Example
{
"cacheSettings": {
"name": "Cache Settings",
"description": "Cache configuration",
"cacheActive": true,
"cacheOnlyHttpGetRequests": true,
"cacheKeyType": "QUERY_PARAMS",
"cacheStorageType": "LOCAL",
"capacity": 1000,
"ttl": 3600,
"handlingAction": "CONTINUE",
"invalidationRequiresAuthn": false,
"cacheNullValue": false,
"variableList": []
},
"deploy": false,
"deployTargetEnvironmentNameList": []
}
Request Body Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| cacheSettings | object | Yes | - | Cache settings object (see fields below) |
| deploy | boolean | No | false | If true, deploy the API proxy after saving changes |
| deployTargetEnvironmentNameList | array[string] | No | - | List of environment names to deploy to (required when deploy=true) |
cacheSettings Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| name | string | Yes | - | Cache settings name |
| description | string | No | - | Cache settings description |
| cacheActive | boolean | No | false | Enable/disable cache |
| cacheOnlyHttpGetRequests | boolean | No | true | Cache only GET requests (if false, caches all methods) |
| cacheKeyType | string | No | QUERY_PARAMS | Cache key type |
| cacheStorageType | string | No | DISTRIBUTED | Cache storage type |
| capacity | integer | No | - | Maximum cache capacity (number of entries) |
| ttl | integer | No | - | Time to live in seconds |
| handlingAction | string | Yes | - | Cache handling action when cache hit occurs |
| invalidationRequiresAuthn | boolean | No | false | Require authentication for cache invalidation |
| cacheNullValue | boolean | No | false | Cache null/empty responses |
| variableList | array | No | [] | List of variables for custom cache key (if cacheKeyType=CUSTOM) |
EnumCacheKeyType
QUERY_PARAMS- Use query parameters as cache keyCUSTOM- Use custom variables as cache key (requires variableList)
EnumCacheStorageType
LOCAL- Local cache (per worker instance)DISTRIBUTED- Distributed cache (shared across all workers)
EnumCacheHandlingAction
CONTINUE- Return cached response and continue to backend (for logging/monitoring)STOP- Return cached response and stop (do not call backend)
Variable Object (for variableList when cacheKeyType=CUSTOM)
{
"name": "userId",
"type": "HEADER",
"dataType": "STRING"
}