# Disallow Cookie Base Cache

The **Disallow Cookie-Based Cache** feature allows you to **bypass CDN caching for requests that include defined cookie key–value pairs**.\
This ensures that personalized or session-based content is always fetched from the origin instead of being served from cache.

Use this feature to prevent incorrect caching of dynamic responses while maintaining optimal cache efficiency for all other traffic.

{% hint style="info" %}
This helps you avoid caching personalized or session-based responses on **Dynamic Content Acceleration** resources.
{% endhint %}

## How Disallow Cookie-Based Cache Works

When the feature is enabled:

* The CDN inspects incoming requests for the configured **cookie key–value pairs**.
* If **any defined pair matches**, the request **bypasses the cache**.
* The response is fetched directly from the origin and is **not stored** in the CDN cache.
* Requests that do not match any configured cookie rules continue to follow normal caching logic.

This behavior applies consistently across all requests for the selected CDN Resource.

## Configure Disallow Cookie-Based Cache

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

{% stepper %}
{% step %}
**Enable the Feature**

In the **Caching** tab of your **Dynamic CDN Resource**, set **Disallow Cookie-Based Cache** to **On**.

<figure><img src="/files/2aFOqbNZMjWU3ppHM1M2" alt="" width="563"><figcaption></figcaption></figure>

The cookie rule inputs become available.
{% endstep %}

{% step %}
**Define Cookie Rules**

Enter the cookie details:

* **Cookie Key** — Name of the cookie to match
* **Cookie Value** — Value that triggers cache bypass

Select **+** to add additional cookie rules if required.
{% endstep %}

{% step %}
**Save changes**

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

* Cache bypass is triggered if **any defined cookie rule matches**.
* Cookie matching is **exact**; both key and value must match.
* This feature affects **cache eligibility only** and does not modify headers or routing logic.
* Requests that do not include matching cookies continue to benefit from CDN caching.
* Use carefully together with [**Page Rules**](/products/performance-cdn/static-content-delivery/advanced-configuration/page-rules.md) to avoid unintended cache bypass.

### Troubleshooting

**Issue:** Responses are still cached.\
**Cause:** The incoming cookie value does not exactly match the configured key-value pair.\
**Fix:** Capture the request cookies from the client and confirm the exact key and value.

**Issue:** Cache hit ratio drops unexpectedly.\
**Cause:** Too many cookie pairs are configured, or a widely present cookie is included.\
**Fix:** Remove non-essential cookies and keep only cookies that must bypass cache.

**Issue:** Configuration does not take effect.\
**Cause:** Changes were not saved.\
**Fix:** Confirm you selected **Submit** and re-check the setting state in the **Caching** tab.


---

# 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/disallow-cookie-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.
