vod_expires_live

The `vod_expires_live` directive sets the expiration time for live video content served by the NGINX-based VOD Packager.

Syntaxvod_expires_live time;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The vod_expires_live directive is designed for managing caching behaviors specifically for live video streams when using the NGINX-based VOD Packager module. By configuring this directive, administrators can specify how long live video content may remain in a cache before it is considered stale. This is particularly important for live content, which may change or need to be retrieved afresh frequently, ensuring that clients receive the most up-to-date streams.

The directive accepts a single argument, which indicates the expiration time for live content. This value can be set in various time units, such as seconds, minutes, or hours (e.g., '10s', '5m', '1h'). Setting vod_expires_live too high may lead to users receiving outdated content, while setting it too low may result in unnecessary requests to the server, adversely affecting performance. Hence, it is essential to balance between freshness and server load based on specific application needs.

The directive is applicable within the http, server, and location contexts, offering flexibility in how it is implemented across the server configuration. Properly using vod_expires_live can enhance user experience and optimize resource utilization by controlling content caching effectively in live streaming applications.

Config Example

server {
    listen 80;
    location /live {
        vod_expires_live 2m;
        vod_enable on;
        # Other VOD configurations...
    }
}

Setting a very low expiration time may increase server load due to more frequent fetching of live content.

Not specifying an expiration time may lead to unpredictable caching behaviors, potentially causing the delivery of stale content.

← Back to all directives