# X-Accel-Expires passed or not?

**URL:** <https://www.ruby-forum.com/t/x-accel-expires-passed-or-not/205991>\
**Category:** NGINX\
**Created:** [April 20, 2011, 5:38am UTC](https://www.ruby-forum.com/t/x-accel-expires-passed-or-not/205991 "2011-04-20T05:38:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dubstep](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/cdc98d/32.png) [@dubstep](https://www.ruby-forum.com/u/dubstep)\
**Post date:** [April 20, 2011, 5:38am UTC](https://www.ruby-forum.com/t/x-accel-expires-passed-or-not/205991/1 "2011-04-20T05:38:44Z")

</div>

Hi all,

I was looking into fastcgi\_cache settings, in Nginx.  
Is it required to pass the header X-Accel-Expires, in order for Nginx to  
cache the data, or do I have set only the fastcgi\_no\_cache and  
fastcgi\_cache\_bypass values?

fastcgi\_pass\_header Set-Cookie;  
fastcgi\_pass\_header X-Accel-Expires; ← not needed, IMO  
fastcgi\_no\_cache $cookie\_cache;  
fastcgi\_cache\_bypass $cookie\_cache;

Thanks.

Posted at Nginx Forum:

> **[X-Accel-Expires passed or not?](https://forum.nginx.org/read.php?2,192484,192484#msg-192484)**
>
> Hi all, I was looking into fastcgi\_cache settings, in Nginx. Is it required to pass the header X-Accel-Expires, in order for Nginx to cache the data, or do I have set only the fastcgi\_no\_cache and fastcgi\_cache\_bypass values? fastcgi\_pass\_header...

---

<div class="post-metadata">

**Author:** ![teck](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/b2d939/32.png) [@teck](https://www.ruby-forum.com/u/teck)\
**Post date:** [April 20, 2011, 7:38am UTC](https://www.ruby-forum.com/t/x-accel-expires-passed-or-not/205991/2 "2011-04-20T07:38:17Z")

</div>

On Tue, Apr 19, 2011 at 11:38:27PM -0400, TECK wrote:

> fastcgi\_cache\_bypass $cookie\_cache;  
> No, X-Accel-Expires should not be passed.  
> fastcgi\_pass\_header passes a header line to a client, but not to  
> nginx itself.

–  
Igor S.
