# Stale Cache

Stale Cache allows CDN edge servers to deliver the last cached version of an object when the origin becomes temporarily unavailable. This includes conditions such as 500–504 errors, invalid headers, timeouts, forbidden responses, or an Updating status. Enabling Stale Cache helps maintain availability and ensures continuity of service during short-term origin instability.

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

Log in to the Medianova Control Panel, select a CDN resource in the CDN section, and navigate to the Stale Cache.

## Configure Stale Cache

This workflow defines which origin responses allow the CDN to serve stale cached content.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2FX6luj8yq2AGCdjaBWQx9%2FEkran%20Resmi%202024-12-16%2012.29.40.png?alt=media&#x26;token=f767cb43-a366-4d19-8144-c507c5aefcb7" alt=""><figcaption></figcaption></figure>

{% stepper %}
{% step %}
**Select stale cache triggers**

Choose one or more conditions from the trigger list. Stale content will be served when **any** selected condition occurs.

Supported triggers in the Medianova Control Panel:

* **error** — Generic error indicator returned by the origin system.
* **timeout** — The CDN did not receive a timely response from the origin.
* **invalid\_header** — The origin returned malformed or unexpected HTTP headers.
* **http\_500** — Internal Server Error.
* **http\_502** — Bad Gateway.
* **http\_503** — Service Unavailable.
* **http\_504** — Gateway Timeout.
* **http\_403** — Forbidden.
* **http\_404** — Not Found.
* **http\_429** — Too Many Requests (rate limit).
* **updating** — The origin is in an update/maintenance state.
  {% endstep %}

{% step %}
**Save the configuration**

Select **Submit** to apply all changes.
{% endstep %}
{% endstepper %}

* Stale content is served **only if** a cached version already exists at the edge.
* Any selected trigger can activate stale delivery.
* When the origin becomes healthy again, normal cache rules resume automatically.
* Stale Cache does not refresh or regenerate content; it only delivers the most recent cached copy.
* This feature is intended for **temporary** failures, not extended outages.

## **FAQ**

**What happens if no triggers are selected?**\
Stale content is never served.

**Will Stale Cache fetch new content?**\
No. It serves only what is already cached.

**Does enabling all triggers hide origin problems?**\
It may delay visibility of backend issues. Select triggers based on operational strategy.

**Does TTL affect stale delivery?**\
TTL defines freshness; stale delivery allows fallback after TTL when origin issues occur.


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://clients.medianova.com/products/performance-cdn/static-content-delivery/advanced-configuration/caching/stale-cache.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
