Segmented caching
When you set the VCL variable req.enable_segmented_caching
to true
in vcl_recv
, you enable a mode, referred to as segmented caching, in which Varnish retrieves and caches files from the origin in segments. Segmented caching was previously known as LFS.
In this mode Varnish will spawn one or more sub-requests, each responsible for a segment of the file. Each segment is cached independently of other segments that constitute the file.
When vcl_log
runs in the context of such a sub-request, segmented_caching.is_inner_req
evaluates to true
. This call to vcl_log
allows you to log the outcome of each segment.
After the sequence of sub-requests has completed, vcl_log
will run with segmented_caching.is_outer_req
evaluating to true
. This call to vcl_log
allows you to log the final outcome of the request.
- segmented_caching.autopurged
- segmented_caching.block_number
- segmented_caching.block_size
- segmented_caching.cancelled
- segmented_caching.client_req.is_open_ended
- segmented_caching.client_req.is_range
- segmented_caching.client_req.range_high
- segmented_caching.client_req.range_low
- segmented_caching.completed
- segmented_caching.error
- segmented_caching.failed
- segmented_caching.is_inner_req
- segmented_caching.is_outer_req
- segmented_caching.obj.complete_length
- segmented_caching.rounded_req.range_high
- segmented_caching.rounded_req.range_low
- segmented_caching.total_blocks