# SSI not evaluated in memcache response

**URL:** <https://www.ruby-forum.com/t/ssi-not-evaluated-in-memcache-response/184877>\
**Category:** NGINX\
**Created:** [March 9, 2010, 8:28pm UTC](https://www.ruby-forum.com/t/ssi-not-evaluated-in-memcache-response/184877 "2010-03-09T20:28:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![xguardiola](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/13edae/32.png) [@xguardiola](https://www.ruby-forum.com/u/xguardiola)\
**Post date:** [March 9, 2010, 8:28pm UTC](https://www.ruby-forum.com/t/ssi-not-evaluated-in-memcache-response/184877/1 "2010-03-09T20:28:42Z")

</div>

Hello all,

I’m having trouble to have an SSI call beeing evaluated once cached in  
memecache.  
For instance.

When I call the first time the page ‘/test/’ which produce the following  
html:  
‘’

the block is replaced by the content  
of  
the ‘/ssi/’ page.  
So the final output is: ‘SSI’

First call full debug log:  
[http://friendpaste.com/71X0cQMkW4qiS5NCuaDnkv](http://friendpaste.com/71X0cQMkW4qiS5NCuaDnkv)

But once ‘/test/’ is cached by memcache (cache value is ‘’)  
The ssi block is not evaluated end the final output is:  
‘’

Second ‘cached’ call debug log:  
[http://friendpaste.com/455AEU8e1Aauv3mU6UQA9D](http://friendpaste.com/455AEU8e1Aauv3mU6UQA9D)

## nginx 0.8.34

upstream gunicorn {  
server 127.0.0.1:8080;  
}

server {  
listen 0.0.0.0;  
server\_name localhost;  
root /var/www/localhost/htdocs;

location @python {  
ssi on;  
proxy\_pass [http://gunicorn](http://gunicorn);  
proxy\_set\_header Host $host;  
}

location /ssi {  
proxy\_pass [http://gunicorn](http://gunicorn);  
proxy\_set\_header Host $host;  
}

## location / { ssi on; set $memcached\_key $uri;#$urlmd5; default\_type “text/html; charset=utf-8”; memcached\_pass 127.0.0.1:11211; error\_page 404 = @python; error\_page 502 = @python; } }

Thanks in advance,  
Xav

---

<div class="post-metadata">

**Author:** ![xguardiola](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/13edae/32.png) [@xguardiola](https://www.ruby-forum.com/u/xguardiola)\
**Post date:** [March 10, 2010, 12:40am UTC](https://www.ruby-forum.com/t/ssi-not-evaluated-in-memcache-response/184877/2 "2010-03-10T00:40:57Z")

</div>

Hello!

On Tue, Mar 09, 2010 at 08:27:52PM +0100, Xavier G. wrote:

> I’m having trouble to have an SSI call beeing evaluated once cached in  
> memecache.

[…]

> location / {  
> ssi on;  
> set $memcached\_key $uri;#$urlmd5;  
> default\_type “text/html; charset=utf-8”;

- default\_type “text/html; charset=utf-8”;

- default\_type text/html;
- charset utf-8;

[…]

Maxim D.

---

<div class="post-metadata">

**Author:** ![xguardiola](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/x/13edae/32.png) [@xguardiola](https://www.ruby-forum.com/u/xguardiola)\
**Post date:** [March 10, 2010, 9:27am UTC](https://www.ruby-forum.com/t/ssi-not-evaluated-in-memcache-response/184877/3 "2010-03-10T09:27:40Z")

</div>

Hello,

> - default\_type “text/html; charset=utf-8”;
> 
> - default\_type text/html;
> - charset utf-8;

thanks !

xav
