<div dir="ltr"><div><div><div><div><div><div><div><div>But i cannot switch with proxy_cache because we're mirroring the mp4 files for random seeking using mp4 module and proxy_cache doesn't support random seeking. Is there a way i can use bash script with proxy_store ? I want the following logic to prevent duplicate downloads :-<br><br></div><div>1st user :-<br><br></div>client (request the test.mp4) --> nginx (file not existed) --> check if tmp.txt not existed --> create tmp.txt --> download the test.mp4 from origin --> remove tmp.txt<br><br></div>2nd user requesting the same test.mp4 :-<br><br></div>client (request test.mp4) --> nginx (file not existed) --> tmp.txt already existed (which means nginx already downloading the file) --> redirect user towards the origin server(keep redirecting users as long as tmp.txt not removed) <br><br></div>3rd user requesting the same test.mp4 :-<br><br></div>client (request test.mp4) --> nginx(file existed) --> serve from the cache.<br><br><br></div>SO tmp.txt plays the main role here and prevent the subsequent requests for the same file but i have no idea how to implement it with nginx. Only if someone point me towards right direction. :(<br><br></div>Regards.<br></div>Shahzaib<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Sep 23, 2014 at 9:41 PM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:vbart@nginx.com" target="_blank">vbart@nginx.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tuesday 23 September 2014 19:34:23 shahzaib shahzaib wrote:<br>
> @Valentine, is proxy_cache_lock supported with proxy_store ?<br>
<br>
</span>No. But if you're asking, then you're using a wrong tool.<br>
The proxy_store feature is designed to be very simple and stupid.<br>
<br>
To meet your needs you should use the proxy_cache directive<br>
and its friends.<br>
<div class="HOEnZb"><div class="h5"><br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div>