# Proxy Feature Request

**URL:** <https://www.ruby-forum.com/t/proxy-feature-request/194700>\
**Category:** NGINX\
**Created:** [September 9, 2010, 9:42am UTC](https://www.ruby-forum.com/t/proxy-feature-request/194700 "2010-09-09T09:42:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mat\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@mat\_h](https://www.ruby-forum.com/u/mat_h)\
**Post date:** [September 9, 2010, 9:42am UTC](https://www.ruby-forum.com/t/proxy-feature-request/194700/1 "2010-09-09T09:42:27Z")

</div>

Ok first of all long time mailing list reader here, first time in a  
while ive sent something in.

Ok, heres my request:  
A module that would allow for a partial proxy\_cache based on the last  
modified date returned by the upstream server, basically here’s the  
pseudo code for it (persuming that the location block had something  
like “proxy\_partial\_cache on;”)

Request: [http://test.com/123.html](http://test.com/123.html)  
Fetch Page [http://upstream/123.html](http://upstream/123.html)  
loop headers {  
if(header==‘last-modified’){  
if(last\_modified\_date \<= proxy\_last\_modified\_date){  
return proxy\_data and terminate\_upstream\_connection;  
}  
}  
}  
return upstream\_data;

Hope that explains my request,  
I would consider putting a few $$ towards such a module/modification  
if someone was to accept (and of course it would be open source) as it  
could save alot of bandwidth for us.

---

<div class="post-metadata">

**Author:** ![mat\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@mat\_h](https://www.ruby-forum.com/u/mat_h)\
**Post date:** [September 9, 2010, 8:53pm UTC](https://www.ruby-forum.com/t/proxy-feature-request/194700/2 "2010-09-09T20:53:31Z")

</div>

Hello!

On Thu, Sep 09, 2010 at 05:40:56PM +1000, mat h wrote:

> Fetch Page [http://upstream/123.html](http://upstream/123.html)  
> loop headers {  
> if(header==‘last-modified’){  
> if(last\_modified\_date \<= proxy\_last\_modified\_date){  
> return proxy\_data and terminate\_upstream\_connection;  
> }  
> }  
> }  
> return upstream\_data;
> 
> Hope that explains my request,

Looks like what you ask for is usually called cache revalidation.

Using If-Modified-Since in request to backend (with last-modified  
from already cached response) and returning cached copy on 304  
backend reply would be better way to go.

Maxim D.

---

<div class="post-metadata">

**Author:** ![mat\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/67e7ee/32.png) [@mat\_h](https://www.ruby-forum.com/u/mat_h)\
**Post date:** [September 10, 2010, 4:00am UTC](https://www.ruby-forum.com/t/proxy-feature-request/194700/3 "2010-09-10T04:00:21Z")

</div>

Yes that is true, I take it nginx doesnt have support for it at the  
moment?
