vod_expires_live_time_dependent

The `vod_expires_live_time_dependent` directive specifies the expiration time for live video streams based on their content type.

Syntaxvod_expires_live_time_dependent duration;
Defaultnone
Contexthttp, server, location
Arguments1

Description

The vod_expires_live_time_dependent directive is utilized in the NGINX-based VOD Packager module to control the expiration time of live stream content. This directive allows administrators to set different expiration times for live streams compared to other content types, which can be essential for managing stream access and cache behavior effectively. By using this directive, you can ensure that live content is judged based on its relevance and availability, improving the user experience and resource management.

In practical application, the directive takes a single argument that indicates the duration for which the live content should be considered valid. When configured, NGINX will automatically adjust the Expires header in the HTTP response to reflect this specified duration for any live stream requests, enabling proper cache control on client-side caches and intermediary proxies. This means if a video is live and frequently changing, clients receive the most up-to-date stream without caching stale data.

Moreover, applying this directive can be particularly beneficial for applications that rely on adaptive bitrate streaming as it allows for more granular control over how long different segments of a live stream are cached, potentially improving both performance and the responsiveness of the stream delivery to end-users. By adjusting cache behavior based on content type, you minimize the chance of serving outdated content and enhance the overall streaming performance.

Config Example

vod_expires_live_time_dependent 1h;

Ensure that the specified duration is in a valid time format, such as '1h' for one hour.

Using a very short expiration time can lead to heavy server load due to frequent cache misses.

Incompatibility with certain cache mechanisms if not properly configured. Adjust upstream cache settings as needed.

← Back to all directives