vod_metadata_cache

The `vod_metadata_cache` directive controls the caching of metadata for video on demand in the NGINX VOD module.

Syntaxvod_metadata_cache size [timeout [cache_type]];
Defaultnone
Contexthttp, server, location
Arguments1-3

Description

The vod_metadata_cache directive is utilized within the contexts of http, server, and location to define parameters regarding how metadata for video files is cached during video-on-demand streaming. Its primary purpose is to improve the performance and efficiency of delivering video content by reducing the need to repeatedly query metadata from the origin server or storage.

The directive accepts one to three arguments, specifying the size of the cache, the timeout duration for cache entries, and optionally, a cache type. If caching is enabled, the first argument indicates the maximum size of the cache that would be allocated for storing metadata. The second argument sets the time-to-live (TTL) for cached entries, ensuring that metadata can be refreshed after a defined period. If a third argument is presented, it specifies the type of cache management strategy that should be employed, such as basic or more sophisticated mechanisms, depending on use cases.

By properly configuring the vod_metadata_cache directive, server administrators can ensure efficient metadata retrieval, which is especially crucial during high-demand scenarios where multiple users are requesting the same video content simultaneously. This can considerably reduce latency and improve user experience when streaming video content.

Config Example

vod_metadata_cache 10m 30s;

Ensure the specified cache size does not exceed server memory limits to avoid performance degradation.

Remember to monitor the cache utilization; overly large caches may lead to inefficient memory usage.

Use appropriate timeout values that reflect actual usage patterns to avoid stale cache entries.

← Back to all directives