# Limiting maximum size of cached responses

**URL:** <https://www.ruby-forum.com/t/limiting-maximum-size-of-cached-responses/221534>\
**Category:** NGINX\
**Created:** [July 18, 2012, 8:18pm UTC](https://www.ruby-forum.com/t/limiting-maximum-size-of-cached-responses/221534 "2012-07-18T20:18:11Z")\
**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:** [July 18, 2012, 8:18pm UTC](https://www.ruby-forum.com/t/limiting-maximum-size-of-cached-responses/221534/1 "2012-07-18T20:18:11Z")

</div>

Is there any way to limit caching by response size, so responses won’t  
be  
cached if they exceed a maximum value?  
E.g. Backend responses larger than 5mb won’t be cached.

Jader H. Silva
