vod_dynamic_mapping_cache

The `vod_dynamic_mapping_cache` directive configures the caching behavior for dynamic VOD mappings in the NGINX VOD module.

Syntaxvod_dynamic_mapping_cache time | time|key | time|key|fallback;
Defaultnone
Contexthttp, server, location
Arguments1-3

Description

The vod_dynamic_mapping_cache directive in the NGINX VOD module allows administrators to control how dynamic mappings for video on demand (VOD) content are cached. This directive can accept one to three parameters, which can vary based on the desired caching strategy. When enabled, this directive facilitates efficient handling of dynamic video files by reducing the need for repeated fetching of the same content during concurrent requests. This is especially beneficial when dealing with high-traffic applications, as it minimizes latency and server load by reusing cached mappings for similar requests.

The first parameter typically specifies the duration for which the mapping should be stored in the cache. The second and third parameters can be used to define a key for accessing cache entries and a fallback mechanism in case the primary caching strategy fails. If the cached version of the dynamic mapping is still valid, NGINX will serve users from the cache rather than processing the request anew, thus optimizing performance and resource management. Developers should carefully consider the potential cache duration and parameters based on the user behavior and content update frequency to avoid serving stale mappings to clients.

Config Example

vod_dynamic_mapping_cache 10m;

Ensure the cache duration aligns with the frequency of content updates to avoid serving outdated media mappings.

Be cautious when setting long cache durations; dynamic content may change, and users might receive stale data.

If using fallback caching, ensure that fallback mechanisms are properly implemented to avoid unnecessary cache misses.

← Back to all directives