# Fastcgi\_cache + ngx\_pagespeed

**URL:** <https://www.ruby-forum.com/t/fastcgi-cache-ngx-pagespeed/237008>\
**Category:** NGINX\
**Created:** [October 18, 2013, 3:08pm UTC](https://www.ruby-forum.com/t/fastcgi-cache-ngx-pagespeed/237008 "2013-10-18T15:08:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![addis\_a](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/c4cdca/32.png) [@addis\_a](https://www.ruby-forum.com/u/addis_a)\
**Post date:** [October 18, 2013, 3:08pm UTC](https://www.ruby-forum.com/t/fastcgi-cache-ngx-pagespeed/237008/1 "2013-10-18T15:08:19Z")

</div>

Hi guys,

First of all, I am aware that this is not the place to get ngx\_pagespeed  
support. I am only coming here because I am this close to archieving the  
performance I need, and here is the place where I had the most sucess  
with  
my questions so far. Forgive me if it is out of place.

Second, I would like to know if there is a NGINX workaround for this  
problem, not a ngx\_pagespeed solution.

So I was able to get all the optimization I need (aggressive) from  
ngx\_pagespeed and offload my static assets (after optimization) to a CDN  
(pull origin). The only performance problem I have now is when serving  
content that HIT’s the fastcgi\_cache.

It seems that ngx\_pagespeed has to do its thing on rendered output html  
everytime a request is made to the page. I through fastcgi\_cache cached  
content was already ngx\_pagespeed optimized versions. It seems like  
ngx\_pagespeed runs in front of nginx/fastcgi\_cache. It is ngx\_pagespeed  
that  
fetches the html from fastcgi\_cache and passes it on.

Are you guys aware of any way to make fastcgi\_cache cache optimized  
output,  
after everything is set and done?

I think there is a solution if I use varnish, but I do not want to add  
another moving part to my setup.

Best regards.

Posted at Nginx Forum:

> **[Fastcgi\_cache + ngx\_pagespeed](https://forum.nginx.org/read.php?2,243824,243824#msg-243824)**
>
> Hi guys, First of all, I am aware that this is not the place to get ngx\_pagespeed support. I am only coming here because I am this close to archieving the performance I need, and here is the place where I had the most sucess with my questions so far....

---

<div class="post-metadata">

**Author:** ![ddutra](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/74df32/32.png) [@ddutra](https://www.ruby-forum.com/u/ddutra)\
**Post date:** [October 18, 2013, 6:39pm UTC](https://www.ruby-forum.com/t/fastcgi-cache-ngx-pagespeed/237008/2 "2013-10-18T18:39:19Z")

</div>

I just looked a little bit more on the topic and it is not possible I  
believe.

I would have to put something in front of nginx (another nginx) or  
Varnish -  
but that is a shame since nginx fastcgi\_cache works so fine.

Best regards.

Posted at Nginx Forum:

> **[Re: Fastcgi\_cache + ngx\_pagespeed](https://forum.nginx.org/read.php?2,243824,243834#msg-243834)**
>
> Hi guys, First of all, I am aware that this is not the place to get ngx\_pagespeed support. I am only coming here because I am this close to archieving the performance I need, and here is the place where I had the most sucess with my questions so far....
