# Max file size for proxy\_cache\_path

**URL:** <https://www.ruby-forum.com/t/max-file-size-for-proxy-cache-path/223367>\
**Category:** NGINX\
**Created:** [October 1, 2012, 9:51pm UTC](https://www.ruby-forum.com/t/max-file-size-for-proxy-cache-path/223367 "2012-10-01T21:51:48Z")\
**Posts on this page:** 1\
**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:** [October 1, 2012, 9:51pm UTC](https://www.ruby-forum.com/t/max-file-size-for-proxy-cache-path/223367/1 "2012-10-01T21:51:48Z")

</div>

Hi.  
Is there any way to limit size of file, that can be cached into  
proxy\_cache\_path?

For example, we have:  
proxy\_cache\_path /var/nginx/cache/html levels=1:2  
keys\_zone=html-cache:18m max\_size=5g inactive=60m;

So, if someone on backend will place a 2G file, and it will be cached,  
the big part of useful cached data will be destroyed by cache manager.  
And second problem - we can’t be sure, that proxy\_temp\_path and  
proxy\_cache\_path will not be overflowed.
