> 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/edge-cache-expiration.md).

# Edge Cache Expiration

Configure how long content remains cached on Medianova CDN edge servers and determine whether cache expiration is controlled by the CDN or the origin server.

**Edge Cache Expiration** defines the time-to-live (TTL) of cached responses. The selected **Cache Type** determines whether the CDN applies a configured TTL, follows origin cache expiration headers, or bypasses edge caching.

You can configure Edge Cache Expiration through the [Medianova Control Panel](https://cloud.medianova.com) or the [API](https://clients.medianova.com/api-documentation/performance-cdn/caching#put-api-v1-cdn-organization_uuid-resource-resource_uuid).

## Cache Types

Edge Cache Expiration supports three cache types:

<table><thead><tr><th width="145.5">Cache Type</th><th>Behavior</th></tr></thead><tbody><tr><td><strong>Edge</strong></td><td>Uses the configured <strong>Cache Time</strong> as the edge cache TTL, overriding cache expiration headers from the origin.</td></tr><tr><td><strong>Origin</strong></td><td>Uses the cache duration specified by the origin through <code>Cache-Control</code> or <code>Expires</code> headers. If no cache duration is provided, the configured <strong>Cache Time</strong> is used as a fallback.</td></tr><tr><td><strong>Dynamic</strong></td><td>Bypasses edge caching and forwards requests to the origin without storing responses in the CDN edge cache.</td></tr></tbody></table>

{% hint style="warning" %}
A **Cache Time** value of `0` disables edge caching when **Edge** or **Origin** is selected. When **Dynamic** is selected, **Cache Time** is not configurable.
{% endhint %}

## Configuration Steps

{% stepper %}
{% step %}

### Open Caching

Open your CDN Resource in the Medianova Control Panel and select **Caching**.

<figure><img src="https://542970813-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtK7oIwmhUHdEJcaH4Hx8%2Fuploads%2FHhnDIHQs5eCmeLi9K26D%2Fimage.png?alt=media&amp;token=c441ce67-2580-4732-b0b0-708be58ab8de" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select the Cache Type

Under **Edge Cache Expiration**, select one of the following from **Cache Type**:

* **Edge**
* **Origin**
* **Dynamic**
  {% endstep %}

{% step %}

### Configure Cache Time

For **Edge** or **Origin**, enter the **Cache Time** and select the corresponding time unit.

* **Edge:** Applies the configured TTL to cached responses.
* **Origin:** Uses the configured TTL as a fallback when the origin does not provide a cache duration.

This step does not apply to **Dynamic**.
{% 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

### Edge-Controlled Expiration

When **Edge** is selected, the CDN uses the configured **Cache Time** to determine how long cached responses remain fresh, regardless of the cache expiration duration specified by the origin.

### Origin-Controlled Expiration

When **Origin** is selected, the CDN uses the expiration duration provided through the origin's `Cache-Control` or `Expires` headers.

If neither header specifies a cache duration, the configured **Cache Time** is used as a fallback.

### Dynamic Cache Bypass

When **Dynamic** is selected, the CDN bypasses edge caching. Requests are forwarded to the origin without storing responses in the CDN edge cache.

## Important Notes

* Longer TTL values are generally suitable for static content that changes infrequently. Shorter TTL values are more appropriate for frequently updated content.
* Edge Cache Expiration controls CDN-side caching. To configure client-side caching, see Browser Cache Rule.


---

# 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/edge-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.
