---
title: req.digest.ratio
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/variables/cache-object/req-digest-ratio
---

**Type:** FLOAT  
**Access:** read-only

**Available in:** pass, miss, hit, fetch, deliver, error, log

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`.
