# Header Base Cache

The **Header Base Cache** feature allows you to **include selected HTTP request headers in the CDN cache key** for **Dynamic Content Acceleration** resources.

This enables the CDN to create **separate cached objects for different header combinations**, ensuring correct delivery of dynamic or personalized content without disabling caching.

{% hint style="info" %}
This feature is available **only for Dynamic CDN Resources**.
{% endhint %}

## How Header Base Cache Works

When **Header Base Cache** is enabled:

* The CDN inspects incoming requests for the configured **HTTP header keys**.
* The specified headers and their values are included in the **cache key**.
* Requests with different header values are cached **as separate variants**.
* Requests that do not include the configured headers follow the default cache behavior.

This approach allows safe caching of responses that vary based on request headers such as language, device hints, or custom application headers.

## Configure Header Base Cache

You can configure this feature from the [**Medianova Control Panel**](https://cloud.medianova.com).

{% stepper %}
{% step %}
**Open the Caching Settings**

Log in to the **Medianova Control Panel**, navigate to **CDN → CDN Resources**, select a **Dynamic CDN Resource**, and open the **Caching** tab.

<figure><img src="/files/Ajex8B1FIhtf2RVgAH5J" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}
**Enable Header Base Cache**

Set **Status** to **On**.

The header input field becomes active.
{% endstep %}

{% step %}
**Add Request Headers**

Enter the header information:

* **Header Key** — Name of the HTTP request header to include in the cache key

Select the **+** button to add additional header keys if required.
{% endstep %}

{% step %}
**Apply the Configuration**

Select **Submit** to save and apply the changes.
{% endstep %}
{% endstepper %}

* Each unique header value creates a **separate cache entry**.
* Header matching is based on the **header name**; values are evaluated dynamically.
* This feature affects **cache key generation**, not cache bypass behavior.
* Adding too many headers may increase cache fragmentation and reduce cache efficiency.
* Header Base Cache can be combined with **Cookie Base Cache** and **Disallow Cookie Base Cache** for advanced cache control strategies.

## Common Use Cases

* Cache responses per language using `Accept-Language`
* Separate cache entries for feature flags or tenant identifiers
* Cache dynamic HTML or JSON responses that vary by request metadata
* Support multi-tenant or region-aware applications


---

# 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/dynamic-content-acceleration/advanced-configuration/caching/header-base-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.
