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

**Type:** STRING  
**Access:** can only be set (cannot be read or unset)

**Available in:** hash, error

Hash value for the object. The hash determines what is unique about an object.
Anything added to the hash will cause Varnish to cache objects separately based
on that information.

For example, adding `req.url` to the hash causes
each URL to be cached as a separate object as one would normally expect.

To ensure purge all functionality works for the service, `req.vcl.generation`
must be added to `req.hash` as shown below:

```vcl
set req.hash += req.vcl.generation;
```
