OvenMediaEngine Enterprise
English
English
  • About
    • Introduction
    • Release Notes
      • 0.18.2
      • 0.18.1
      • 0.18.0
      • 0.17.3
      • 0.17.2
      • 0.17.1
      • 0.17.0
      • 0.16.8
      • 0.16.7
      • 0.16.6
      • 0.16.5
      • 0.16.4
  • Installation
    • Getting Started
      • Getting Started with Ubuntu
      • Getting Started with RHEL
      • Getting Started with Docker
    • Configuration Structure Overview
  • Web Console
    • Getting Started with Web Console
    • Web Console Overview
      • Sign In
      • Change Password
      • Web Console Home
      • Stream List
        • Managed and Instant Streams
        • Scheduled Channels | 0.16.4.0+
        • Multiplex Channels | 0.16.5.0+
      • Event Monitoring | 0.18.1.0+
        • Configuration
        • Event Specification
      • Web Console Publishing | 0.18.1.2+
      • Logs
      • Configuration Files
      • Restart
    • Web Console Settings
      • Server Settings
      • Live Sources (Ingress Protocols) Settings
      • ABR and Transcoding Settings
      • Streaming (Egress Protocols) Settings
      • TLS Encryption Settings | 0.14.0.0+
      • Access Control Settings
      • Thumbnail Settings | 0.15.7.0+
      • Recording Settings | 0.16.5.0+
      • Push Publishing Settings | 0.15.14.0+
      • REST API Settings | 0.11.0.0+
      • Alert Settings | 0.15.11.0+
  • CDN Compatibility
    • Origin Server Redundancy
    • Origin Cache Control
  • Protection
    • RTMP Authentication | 0.17.2.0+
    • Proxy Protocol Integration | 0.16.6.2+
    • Digital Rights Management (DRM)
      • OvenMediaEngine Configuration for DRM | 0.16.0.0+
      • PallyCon DRM Configuration | 0.16.4.0+
  • Performance
    • Hardware-Accelerated Video Encoding | 0.16.4.0+
  • Event Insertion
    • Insert SEI into H.264 (AVC) Streams | v0.18.0.0+
    • Insert AMF0 messages in RTMP Push Publisher | 0.17.3.0+
  • Monetization
    • Insert Ad Markers (EXT-X-CUE-OUT/EXT-X-CUE-IN) | v0.17.3.0+
    • Insert onCuePoint messages into YouTube Live | 0.17.3.0+
  • Advanced Management
    • Generating Audio PTS | 0.17.2.3+
    • API Storage | 0.17.0.0+
    • Restart Application | 0.17.0.0+
    • Record Delivery | 0.16.5.0+
    • Add Delay to the Stream
    • Control Default Playlist Creation
Powered by GitBook
On this page
  1. CDN Compatibility

Origin Cache Control

Control Origin Cache

You can specify how long content should be cached on edge servers or CDN cache servers by adding a Cache-Control header to the HTTP response.

Set the <Publishers><LLHLS><CacheControl> in Server.xml like this:

<?xml version="1.0" encoding="UTF-8"?>
<Server version="8">
  ...
  <VirtualHosts>
    <VirtualHost>
      <Applications>
        <Application>
          <Publishers>
            ...
            <LLHLS>
              <OriginMode>true</OriginMode>
              <CacheControl>
                <MasterPlaylistMaxAge>0</MasterPlaylistMaxAge>
                <ChunklistMaxAge>0</ChunklistMaxAge>
                <ChunklistWithDirectivesMaxAge>60</ChunklistWithDirectivesMaxAge>
                <SegmentMaxAge>-1</SegmentMaxAge>
                <PartialSegmentMaxAge>-1</PartialSegmentMaxAge>
              </CacheControl>
            </LLHLS>
          </Publishers>
        </Application>
      </Applications>
    </VirtualHost>
  </VirtualHosts>
</Server>
Element
Description

MasterPlaylistMaxAge

Specifies the max-age of the Master Playlist. It will not change while the Stream is being created.

ChunklistMaxAge

Specifies the max-age of the Media Playlist. It must always respond with the latest Media Playlist and is a URL without Delivery Directives for LL-HLS. Therefore, it should be cached as short as possible or not at all.

ChunklistWithDirectivesMaxAge

SegmentMaxAge

Specifies the max-age of the Segment File. The URL of the Segment File is unique while the Stream is being created and can be cached for a long time because the content of the same URL does not change.

PartialSegmentMaxAge

Specifies the max-age of the Partial Segment File. The URL of the Partial Segment File is unique while the Stream is being created and can be cached for a long time because the content of the same URL does not change.

<CacheControl> Elements

Element
Description

0

CacheControl: no-cache, no-store

Instructs not to cache the content at all, always fetching new data from the Server.

Greater than 0

CacheControl: max-age=<seconds>

Specifies the duration for which the Cache remains valid.

-1

Without CacheControl header

Indicates that no specific Cache Header will be sent from the Origin. In this case, caching may not be used at all, or the CDN or Cache server's policies may be applied, or the default Cache behavior of the Client or Browser may be followed.

<CacheControl> can be used with 0 and positive values, while using -1 may result in unexpected caching behaviors, so caution is advised.

PreviousOrigin Server RedundancyNextRTMP Authentication | 0.17.2.0+

Specifies the max-age of the Media Playlist with the . The currently supported Delivery Directives are _HLS_msn and _HLS_part. It is a Playlist with Segment numbers and Partial Segment numbers, and this URL is unique while the Stream is being created and can be cached for a long time because the content of the same URL does not change.

Low-Latency HLS Delivery Directives