req.digest.ratio

FLOAT, read-only.

Available inpassmisshitfetchdelivererrorlog

A floating point number between 0 and 1 derived from the object digest.

Use this variable in an if conditional compared to a constant floating point number between 0 and 1 (inclusive) if you need to apply some special handling only to a chosen percentage of all your objects. Keep in mind that the digest is not yet known in vcl_recv because it is computed only after vcl_hash returns.

The variable was introduced for selecting among directors in vcl_miss.

User contributed notes

We welcome comments that add use cases, ideas, tips, and caveats. All comments will be moderated before publication. To post support questions, visit our support center and we'll find you the help you need.