> For the complete documentation index, see [llms.txt](https://clients.medianova.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/error-status-code-cache-expiration.md).

# Error Status Code Cache Expiration

Configure how long specific HTTP error responses remain cached on CDN edge servers.

**Error Status Code Cache Expiration** allows you to configure cache durations for selected HTTP error status codes. Caching frequently returned error responses can reduce repeated requests to the origin while the configured cache duration remains valid.

You can manage Error Status Code Cache Expiration in the [Medianova Control Panel](https://cloud.medianova.com) or via the [API](https://clients.medianova.com/api-documentation/performance-cdn/caching#put-api-v1-cdn-organization_uuid-resource-resource_uuid-4).

{% hint style="info" %}
Use short cache durations for temporary origin or application errors to reduce the risk of serving outdated error responses after the underlying issue has been resolved.
{% endhint %}

## Configure Error Status Code Cache Expiration

{% stepper %}
{% step %}

### Open Error Status Code Cache Expiration

Open your CDN Resource and select **Caching**.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2F6frge9UyphTz1ekrrJOj%2Fimage.png?alt=media&amp;token=8326e122-112f-478b-a399-b2434a83ecc1" alt=""><figcaption></figcaption></figure>

Locate **Error Status Code Cache Expiration**.
{% endstep %}

{% step %}

### Add a Rule

Select **Add rule**.

The **Add Error Status Code Cache Expiration** dialog opens.
{% endstep %}

{% step %}

### Configure the Cache Time

Under **Cache Time**, enter the duration for which matching error responses should remain cached.

Select the appropriate time unit from the adjacent dropdown.
{% endstep %}

{% step %}

### Select Status Codes

Under **Status Codes**, select the HTTP status codes to which the cache duration should apply.

A rule can be configured for the available error status codes in the selector.
{% endstep %}

{% step %}

### Add the Rule

Select **Add rule**.

The rule is added to the **Error Status Code Cache Expiration** table.
{% endstep %}

{% step %}

### Save the Configuration

Select **Save** in the pending changes bar.

Review the pending changes and confirm the update to apply the configuration to the CDN Resource.
{% endstep %}
{% endstepper %}

## Cache Behavior

Each configured rule associates selected HTTP error status codes with a cache duration.

When the CDN receives a response with a configured status code, the error response can remain cached at the edge for the specified duration. Subsequent requests can be served from the cached error response until that duration expires.

If no cache definition exists for a status code, the response is not cached by this feature.

{% hint style="info" %}
Removing a cache definition does not purge error responses that are already cached. Existing cached responses remain subject to their current cache expiration.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/error-status-code-cache-expiration.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
