# Question on Proxy\_Cache\_Path

**URL:** <https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121>\
**Category:** NGINX\
**Created:** [April 22, 2009, 2:20am UTC](https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121 "2009-04-22T02:20:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Resicow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c57346/32.png) [@Resicow](https://www.ruby-forum.com/u/Resicow)\
**Post date:** [April 22, 2009, 2:20am UTC](https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121/1 "2009-04-22T02:20:41Z")

</div>

Hello,

Have a quick question for you.

Is it possible for proxy\_temp\_path and proxy\_cache\_path to be on  
separate volumes?

It seems like nginx accepts this, however when I tried nginx would make  
the folders necessary in proxy\_cache\_path, but wouldn’t ever copy files  
from the temp\_path to the cache\_path. When I locate the temp\_path and  
the cache\_path on the same volume, then everything works as expected.

This would be very helpful, is there anyway to accomplish this?

Thanks,

John

---

<div class="post-metadata">

**Author:** ![Resicow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c57346/32.png) [@Resicow](https://www.ruby-forum.com/u/Resicow)\
**Post date:** [April 22, 2009, 10:05am UTC](https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121/2 "2009-04-22T10:05:53Z")

</div>

On Tue, Apr 21, 2009 at 07:10:41PM -0500, Resicow wrote:

> the cache\_path on the same volume, then everything works as expected.
> 
> This would be very helpful, is there anyway to accomplish this?

Currently, these path must be on the same volume, because nginx just  
link() to new place without copying. However, I plan to fallback  
to copy temp file to another temporarily file on proxy\_cache\_path  
voulme and then link() it to permanent name. As current workaround  
you may set special proxy\_temp\_path for some locaitons only:

http {

```
 proxy_cache_path /vol1/cache ...
 proxy_temp_path /vol2/temp;

 server {

     location / {
         proxy_cache ...
         proxy_temp_path /vol1/temp;
```

---

<div class="post-metadata">

**Author:** ![Resicow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c57346/32.png) [@Resicow](https://www.ruby-forum.com/u/Resicow)\
**Post date:** [April 22, 2009, 5:40pm UTC](https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121/3 "2009-04-22T17:40:28Z")

</div>

Thanks!

Will this be in the next version?

The issue is that in order to do proxy\_cache obviously proxy\_buffer  
needs to be on. This is bad if you set the minimum number of hits for a  
file to 10 lets say… so nginx will buffer and write the file out 10  
times, and then just throw the file away since it is not considered for  
inclusion into the cache.

This may be okay under normal circumstances… but if you have an SSD in  
the computer, you’ll burn up all of your write cycles very quickly.  
Instead proxy\_temp can be on a regular HDD, and then nginx can copy the  
file to the proxy\_cache location on the SSD if the file is being  
included in the cache.

Thanks,

John

---

<div class="post-metadata">

**Author:** ![Resicow](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/c57346/32.png) [@Resicow](https://www.ruby-forum.com/u/Resicow)\
**Post date:** [February 1, 2010, 9:10pm UTC](https://www.ruby-forum.com/t/question-on-proxy-cache-path/166121/4 "2010-02-01T21:10:41Z")

</div>

does temp and cache use the same amount of space?

Posted at Nginx Forum:

> **[Re: Question on Proxy\_Cache\_Path](https://forum.nginx.org/read.php?2,1313,48485)**
>
> Hello, Have a quick question for you. Is it possible for proxy\_temp\_path and proxy\_cache\_path to be on separate volumes? It seems like nginx accepts this, however when I tried nginx would make the folders necessary in proxy\_cache\_path, but
