# Does fastcgi\_cache depends on open\_file\_cache?

**URL:** <https://www.ruby-forum.com/t/does-fastcgi-cache-depends-on-open-file-cache/222924>\
**Category:** NGINX\
**Created:** [September 15, 2012, 1:17am UTC](https://www.ruby-forum.com/t/does-fastcgi-cache-depends-on-open-file-cache/222924 "2012-09-15T01:17:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![aris](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/a/258eb7/32.png) [@aris](https://www.ruby-forum.com/u/aris)\
**Post date:** [September 15, 2012, 1:17am UTC](https://www.ruby-forum.com/t/does-fastcgi-cache-depends-on-open-file-cache/222924/1 "2012-09-15T01:17:55Z")

</div>

Hi All,

I use Nginx on many sites and recently I thought to make use of  
fastcgi\_cache to capture response of PHP-FPM.

I want to put it in RAM (We have 32GB RAM. More than 50% of it is free)

I am confused as some article suggests - declaring “open\_file\_cache”  
before  
we can make use of fastcgi\_cache.

Can’t I directly use fastcgi\_cache on /run/cache ?

Please suggest.

Posted at Nginx Forum:

> **[Does fastcgi\_cache depends on open\_file\_cache?](https://forum.nginx.org/read.php?2,230739,230739#msg-230739)**
>
> Hi All, I use Nginx on many sites and recently I thought to make use of fastcgi\_cache to capture response of PHP-FPM. I want to put it in RAM (We have 32GB RAM. More than 50% of it is free) I am confused as some article suggests - declaring...

---

<div class="post-metadata">

**Author:** ![rahul286](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rahul286](https://www.ruby-forum.com/u/rahul286)\
**Post date:** [September 16, 2012, 1:57pm UTC](https://www.ruby-forum.com/t/does-fastcgi-cache-depends-on-open-file-cache/222924/2 "2012-09-16T13:57:24Z")

</div>

Hi,

On Sat, Sep 15, 2012 at 7:17 AM, rahul286 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi All,
> 
> I use Nginx on many sites and recently I thought to make use of  
> fastcgi\_cache to capture response of PHP-FPM.
> 
> I want to put it in RAM (We have 32GB RAM. More than 50% of it is free)
> 
> I am confused as some article suggests - declaring “open\_file\_cache” before  
> we can make use of fastcgi\_cache.

No. “open\_file\_cache” is related to open file descriptors:

> **[Module ngx\_http\_core\_module](http://nginx.org/en/docs/http/ngx_http_core_module.html#open_file_cache)**
>
> This directive appeared in version 1.11.8.

and “fastcgi\_cache”  
is only related to HTTP cache. They are two different things.

> Can’t I directly use fastcgi\_cache on /run/cache ?

Yes, you can.

Regards,

---

<div class="post-metadata">

**Author:** ![rahul286](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/d78d45/32.png) [@rahul286](https://www.ruby-forum.com/u/rahul286)\
**Post date:** [September 16, 2012, 2:55pm UTC](https://www.ruby-forum.com/t/does-fastcgi-cache-depends-on-open-file-cache/222924/3 "2012-09-16T14:55:16Z")

</div>

Thanks Joshua. 🙂

Got it working directly. It turned out to be easier than I thought.

Only thing complicated was no support for something like  
fastcgi\_cache\_purge  
in core

I need to remove official nginx & go through recompilation with

> **[GitHub - FRiCKLE/ngx\_cache\_purge: nginx module which adds ability to purge...](https://github.com/FRiCKLE/ngx_cache_purge)**
>
> nginx module which adds ability to purge content from FastCGI, proxy, SCGI and uWSGI caches. - GitHub - FRiCKLE/ngx\_cache\_purge: nginx module which adds ability to purge content from FastCGI, proxy...

I hope someday, something like this will be part of Nginx core…

Posted at Nginx Forum:

> **[Re: Does fastcgi\_cache depends on open\_file\_cache?](https://forum.nginx.org/read.php?2,230739,230762#msg-230762)**
>
> Hi All, I use Nginx on many sites and recently I thought to make use of fastcgi\_cache to capture response of PHP-FPM. I want to put it in RAM (We have 32GB RAM. More than 50% of it is free) I am confused as some article suggests - declaring...
