# Default proxy\_cache\_key breaks SSI

**URL:** <https://www.ruby-forum.com/t/default-proxy-cache-key-breaks-ssi/194737>\
**Category:** NGINX\
**Created:** [September 9, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/default-proxy-cache-key-breaks-ssi/194737 "2010-09-09T18:31:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shish](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/f08c70/32.png) [@Shish](https://www.ruby-forum.com/u/Shish)\
**Post date:** [September 9, 2010, 6:31pm UTC](https://www.ruby-forum.com/t/default-proxy-cache-key-breaks-ssi/194737/1 "2010-09-09T18:31:49Z")

</div>

The default proxy\_cache\_key is “$scheme$proxy\_host$request\_uri;” This  
means that when a non-cacheable page includes a cacheable part via SSI,  
the part is stored using the key of the main page, and the next person  
to view the main page will have only that part displayed to them.  
Replacing $request\_uri with just $uri fixed this for me – now I can  
have a dynamic layout with several static chunks inside. Perhaps it  
would be worth updating the default, as I see no downside to using $uri,  
and it could save others from the same confusion?

Posted at Nginx Forum:

> **[default proxy\_cache\_key breaks SSI](https://forum.nginx.org/read.php?2,128831,128831#msg-128831)**
>
> The default proxy\_cache\_key is "$scheme$proxy\_host$request\_uri;" This means that when a non-cacheable page includes a cacheable part via SSI, the part is stored using the key of the main page, and the next person to view the main page will...
