---
title: beresp.stale_while_revalidate
summary: null
url: >-
  https://www.fastly.com/documentation/reference/vcl/variables/backend-response/beresp-stale-while-revalidate
---

**Type:** RTIME  
**Access:** can be read and set, but not unset

**Available in:** fetch

Same as `beresp.stale_if_error` except controls the maximum stale age for 
stale while revalidate functionality.

Note that if an object's TTL has expired and it is eligible to be served stale 
and to be served stale while revalidating, stale while revalidate takes 
precedence. By default the value of `beresp.stale_while_revalidate` will be 
parsed from the `stale-while-revalidate` value in the `Surrogate-Control` or 
`Cache-Control` headers received from the backend.
