# Add \`X-Cache-Status\` HTTP header

**URL:** <https://meta.discourse.org/t/add-x-cache-status-http-header/249580>\
**Category:** Feature\
**Created:** [December 21, 2022, 2:49pm UTC](https://meta.discourse.org/t/add-x-cache-status-http-header/249580 "2022-12-21T14:49:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![adrelanos](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/adrelanos/32/121409_2.png) [@adrelanos](https://meta.discourse.org/u/adrelanos)\
**Post date:** [December 21, 2022, 2:49pm UTC](https://meta.discourse.org/t/add-x-cache-status-http-header/249580/1 "2022-12-21T14:49:48Z")

</div>

Purpose: Would be nice there was a simple way to check if caching is actually functional.

In [discourse/config/nginx.sample.conf at main · discourse/discourse · GitHub](https://github.com/discourse/discourse/blob/main/config/nginx.sample.conf) for the frontend:

```
add_header X-Cache-Status $upstream_cache_status;

```

Quote [Module ngx\_http\_upstream\_module](https://nginx.org/en/docs/http/ngx_http_upstream_module.html)

> `$upstream_cache_status`  
> keeps the status of accessing a response cache (0.8.3). The status can be either “`MISS`”, “`BYPASS`”, “`EXPIRED`”, “`STALE`”, “`UPDATING`”, “`REVALIDATED`”, or “`HIT`”.
