segmented_caching.is_inner_req

BOOL, read-only.

Available inlog

Whether VCL is running in the context of a subrequest that is retrieving a segment of a file.

A request for which vcl_recv enabled segmented caching (by setting req.enable_segmented_caching to true) will spawn one or more subrequests, each responsible for a segment of the file. When vcl_log runs in the context of such a subrequest, segmented_caching.is_inner_req evaluates to true.

This is useful for controlling what you log. For example, if you are only interested in logging the outcome of the client's request and not the outcome of each individual segment that was needed to assemble it, then put your logging within a condition that only applies when segmented_caching.is_inner_req evaluates to false, like this: if (!segmented_caching.is_inner_req) { log ... }.

User contributed notes

BETA

Do you see an error in this page? Do you have an interesting use case, example or edge case people should know about? Share your knowledge and help people who are reading this page! (Comments are moderated; for support, please contact Fastly support)