> 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/range-based-caching.md).

# Range Based Caching

Configure byte-range caching to improve the delivery of large files and content accessed through partial HTTP requests.

**Range Based Caching** allows Medianova CDN to divide cacheable objects into fixed-size byte-range segments. Instead of retrieving an entire file from the origin, the CDN can retrieve and cache the segments needed to fulfill a request.

This feature is useful for video streaming, large file downloads, PDF documents, and other content accessed through HTTP Range requests.

You can configure Range Based Caching 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-8).

## Configuration Steps

{% stepper %}
{% step %}

### Open Range Based 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%2Fxtk7E3mQZba38Y6S528J%2Fimage.png?alt=media&#x26;token=f67599d4-85c8-48d9-9bb8-e43ebed56463" alt="Range Based Caching configuration in the Medianova Control Panel"><figcaption><p>Range Based Caching configuration.</p></figcaption></figure>
{% endstep %}

{% step %}

### Enable Range Based Caching

Enable the **Range Based Caching** toggle.

When enabled, the CDN can retrieve and cache content in fixed-size byte-range segments.
{% endstep %}

{% step %}

### Select the Segment Size

Select the required value from **Segment Size**.

The configured segment size determines how the CDN divides content into cacheable byte ranges.

* **Smaller segments** – Allow more granular caching of requested portions but may increase the number of cached segments.
* **Larger segments** – Reduce the number of segments required for an object but may require retrieving more data than a client requests.

{% hint style="info" %}
Changing **Segment Size** affects newly cached segments. Existing cached segments remain available until they expire or are evicted from the cache.
{% endhint %}
{% 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 %}

## How Range Based Caching Works

Range Based Caching uses HTTP byte-range requests to retrieve and cache portions of an object.

### 1. Client Requests Partial Content

A client can request a specific portion of a file using the HTTP `Range` request header.

For example:

```http
GET /video.mp4 HTTP/1.1
Host: example.mncdn.com
Range: bytes=0-1048575
```

This request asks for the first 1 MiB of the file. The `Range` header specifies the requested byte positions.

### 2. CDN Retrieves and Caches Segments

When the requested content is not available in the edge cache, the CDN can retrieve the required byte-range segments from the origin.

The CDN uses the configured **Segment Size** to determine the boundaries of cached segments.

For example, with a segment size of 1 MiB, a large object can be divided into segments covering:

* `0-1048575`
* `1048576-2097151`
* `2097152-3145727`

These ranges illustrate how an object can be divided into fixed-size segments.

### 3. CDN Serves Partial Content

When the requested byte range is available in the edge cache, the CDN can serve it without retrieving the same content from the origin again.

A successful single-range request typically returns **206 Partial Content**, with a `Content-Range` response header identifying the returned bytes.

Subsequent requests for cached portions can be fulfilled directly from the edge, subject to normal cache expiration behavior.

## Common Use Cases

<table><thead><tr><th width="219">Use Case</th><th>Benefit</th></tr></thead><tbody><tr><td><strong>Video Streaming</strong></td><td>Supports playback and seeking when clients request specific portions of video files.</td></tr><tr><td><strong>Large File Downloads</strong></td><td>Allows clients to request or resume selected portions of large objects.</td></tr><tr><td><strong>PDF Documents</strong></td><td>Supports partial retrieval when PDF viewers request specific byte ranges.</td></tr><tr><td><strong>Binary File Delivery</strong></td><td>Reduces repeated origin transfers for frequently requested portions of large binary objects.</td></tr></tbody></table>

## Important Notes

* Range Based Caching requires the origin to support HTTP byte-range requests for the requested content.
* HTTP Range requests can be used independently of this feature. Range Based Caching controls how retrieved byte-range segments are stored and reused at the CDN edge.
* **Segment Size** determines cache segmentation; it does not require clients to request data in the same segment sizes.
* Range Based Caching does not replace standard cache expiration settings. Cached segments remain subject to the CDN Resource's caching configuration.
* To configure cache expiration, see Edge Cache Expiration.


---

# 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/range-based-caching.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.
