> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flowx.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Clear cache

> Clear specific application caches to force refresh of cached data and resolve performance issues

<Warning>
  **Reference under review.** The path of this endpoint (`/api/internal/...`) indicates it is an internal admin operation, not part of the public integration API. For supported integration patterns, see [Consuming FlowX from external apps](/5.9/docs/platform-deep-dive/integrations/consuming-flowx-from-external-apps).
</Warning>

This endpoint allows administrators to clear specific application caches within the FlowX platform. Cache clearing is typically used during maintenance, after configuration changes, or when troubleshooting performance issues that may be caused by stale cached data.

<Warning>
  This operation can temporarily impact application performance as the system rebuilds cleared caches. Use during maintenance windows when possible.
</Warning>

<Check>
  This operation requires admin-level authentication and should only be performed by authorized system administrators.
</Check>

<ParamField path="baseUrlAdmin" type="string" required>
  The base URL of your FlowX Admin application. This is the admin interface endpoint where administrative operations are performed.

  Example: `https://admin.your-domain.com`
</ParamField>

<ParamField header="Authorization" type="string" required>
  Bearer token for admin authentication. Must be a valid admin user token with cache management permissions.

  Format: `Bearer <your-admin-token>`
</ParamField>

<ParamField header="Content-Type" type="string" required>
  Must be set to `application/json` for proper request processing.
</ParamField>

<ParamField body="cacheNames" type="array" required>
  Array of cache names to be cleared. Each cache name should be a valid string identifier for an existing cache in the system.

  * `flowx:core:cache` - Core application cache

  ```json theme={"system"}
  {
      "cacheNames": [
          "flowx:core:cache"
      ]
  }
  ```
</ParamField>

<RequestExample>
  ```bash cURL theme={"system"}
  curl -X POST '{{baseUrlAdmin}}/api/internal/cache/clear' \
    -H 'Authorization: Bearer <your-admin-token>' \
    -H 'Content-Type: application/json' \
    -d '{
      "cacheNames": [ 
        "flowx:core:cache"
      ]
    }'
  ```

  ```javascript JavaScript theme={"system"}
  const response = await fetch('{{baseUrlAdmin}}/api/internal/cache/clear', {
    method: 'POST',
    headers: {
      'Authorization': 'Bearer <your-admin-token>',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      cacheNames: [
        'flowx:core:cache'
      ]
    })
  });

  const result = await response.json();
  ```

  ```python Python theme={"system"}
  import requests

  url = "{{baseUrlAdmin}}/api/internal/cache/clear"
  headers = {
      "Authorization": "Bearer <your-admin-token>",
      "Content-Type": "application/json"
  }
  payload = {
      "cacheNames": [
          "flowx:core:cache",
      ]
  }

  response = requests.post(url, headers=headers, json=payload)
  result = response.json()
  ```
</RequestExample>

## Response

<ResponseField name="status" type="string" required>
  Indicates the success or failure of the cache clearing operation.

  * `success` - Cache clearing completed successfully
  * `error` - Cache clearing failed
</ResponseField>

<ResponseField name="message" type="string">
  Optional descriptive message providing additional details about the operation result.
</ResponseField>

<ResponseField name="clearedCaches" type="array">
  Array of cache names that were successfully cleared. Only present in successful responses.
</ResponseField>

<ResponseField name="timestamp" type="string">
  ISO 8601 timestamp of when the operation was completed.
</ResponseField>

<ResponseExample>
  ```json Success (200) theme={"system"}
  {
    "status": "success",
    "message": "Caches cleared successfully",
    "clearedCaches": [
      "flowx:core:cache"
    ],
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```

  ```json Error (400) - Invalid Cache Name theme={"system"}
  {
    "status": "error",
    "message": "One or more cache names are invalid",
    "invalidCaches": [
      "invalid:cache:name"
    ],
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```

  ```json Error (401) - Unauthorized theme={"system"}
  {
    "status": "error",
    "message": "Authentication required. Please provide a valid admin token.",
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```

  ```json Error (403) - Forbidden theme={"system"}
  {
    "status": "error", 
    "message": "Insufficient permissions. Admin role required for cache operations.",
    "timestamp": "2024-01-15T10:30:00Z"
  }
  ```
</ResponseExample>


## Related topics

- [Process definition](/5.9/docs/building-blocks/process/process-definition.md)
- [Overview](/release-notes/v5.x/v5.1.x-lts/v5.1.0-october-2025/migrating-from-v4.7.x-to-5.1/migration-overview.md)
- [FlowX.AI 5.2.0 Release Notes](/release-notes/v5.x/v5.2.0-november-2025/v5.2.0-november-2025.md)
- [Single Select](/5.9/docs/building-blocks/ui-designer/ui-component-types/form-elements/select-form-field.md)
- [Buttons](/5.9/docs/building-blocks/ui-designer/ui-component-types/buttons.md)
