# Is it possible to have infinite proxy\_cache\_valid?

**URL:** <https://www.ruby-forum.com/t/is-it-possible-to-have-infinite-proxy-cache-valid/191420>\
**Category:** NGINX\
**Created:** [July 12, 2010, 1:54pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-have-infinite-proxy-cache-valid/191420 "2010-07-12T13:54:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 12, 2010, 1:54pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-have-infinite-proxy-cache-valid/191420/1 "2010-07-12T13:54:51Z")

</div>

* * *

nginx mailing list  
removed\_email\_address@domain.invalid  
[http://nginx.org/mailman/listinfo/nginx](http://nginx.org/mailman/listinfo/nginx)

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [July 12, 2010, 6:00pm UTC](https://www.ruby-forum.com/t/is-it-possible-to-have-infinite-proxy-cache-valid/191420/2 "2010-07-12T18:00:47Z")

</div>

On Mon, Jul 12, 2010 at 02:53:55PM +0300, [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi,  
> I want to be able to cache proxy responses indefinitely (until purged  
> manually by me, using cache purge module).
> 
> > From the docs it seems like proxy\_cache\_valid must get a number, can  
> > it get something to tell it to store indefinitely (until purged or  
> > until LRU)?  
> > Something like:  
> > proxy\_cache\_valid infinite;

Currently there is no way to say infinite, but you can set

```
 proxy_cache /path/to/cache inactive=2y ...;
 proxy_cache_valid 2y;

```

–  
Igor S.

> **[Igor Sysoev](http://sysoev.ru/en/)**
