<div dir="ltr">You may use the md5 function in order to get the cache file on filesystem, Ex:<div><br></div><div>If you use the cache key "$host$uri$is_args$args" and the cache base path is /var/cache/nginx/ and cache has 2 levels (levels=1:2)</div><div><br></div><div>Considering the URL "<a href="http://example.com/static/test.png" target="_blank" style="font-size:12.8px">http://example.com/static/test.png</a>"</div><div><br></div><div>The cache file name will be /var/cache/nginx/5/43/6e281642dfbf0b9ebf4cfb30142ab435</div><div><br></div><div>Based on:</div><div><br></div><div><div>echo -n '<a href="http://example.com/static/test.png">example.com/static/test.png</a>' | md5sum</div><div>6e281642dfbf0b9ebf4cfb30142ab435</div></div><div><br></div><div>First level = 5 </div><div>Second level = 43</div><div>Filename = 6e281642dfbf0b9ebf4cfb30142ab435</div><div><br></div><div><br></div><div>Hope it helps</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 20, 2016 at 6:05 AM, Tigran Bayburtsyan <span dir="ltr"><<a href="mailto:tigran.bayburtsyan@gmail.com" target="_blank">tigran.bayburtsyan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div lang="EN-US" link="#0563C1" vlink="#954F72"><div><p class="MsoNormal">Hi All<u></u><u></u></p><p class="MsoNormal">I’m doing centralized service for clearing our servers Nginx cache for specific files, but I can’t find the algorithm how Nginx making cache file based on request and cache_key.<u></u><u></u></p><p class="MsoNormal">The only thing in documentation is <a href="http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path" target="_blank">http://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_path</a> <u></u><u></u></p><p class="MsoNormal">How can I get cache file path for this static file <a href="http://example.com/static/test.png" target="_blank">http://example.com/static/test.png</a> ?<u></u><u></u></p><p class="MsoNormal"><u></u> <u></u></p><p class="MsoNormal">Thanks<u></u><u></u></p></div></div><br>_______________________________________________<br>
nginx-devel mailing list<br>
<a href="mailto:nginx-devel@nginx.org">nginx-devel@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-devel" rel="noreferrer" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-devel</a><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><h1 style="font-family:Arial;font-size:14px;margin-bottom:10px;color:rgb(68,68,71)"><br></h1><div><div style="color:rgb(0,0,0);font-family:Arial;font-size:medium;height:7px;width:0px;border-left-width:15px;border-left-style:solid;border-left-color:rgb(239,101,47);border-right-width:7px;border-right-style:solid;border-right-color:rgb(247,183,160);margin-bottom:15px"></div><div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:14px;font-weight:bold">Daniel Biazus</div><div style="color:rgb(0,0,0);font-family:Arial,Helvetica,sans-serif;font-size:12px">infrastructure Engineering</div><div style="margin:1em 0px 0px;font-family:Arial,Helvetica,sans-serif;color:rgb(239,101,47)">Azion Technologies</div><div style="color:rgb(0,0,0);margin:0.25em 0px;font-family:Arial,Helvetica,sans-serif;font-size:11px">Porto Alegre, Brasil +55 51 3012 3005 | +55 51 82279032</div><div style="color:rgb(0,0,0);margin:0.25em 0px;font-family:Arial,Helvetica,sans-serif;font-size:11px">Miami, USA +1 305 704 8816</div><table border="0" cellspacing="0" cellpadding="0" style="font-family:Arial;max-width:500px"><tbody><tr><td><br><p style="font-size:10px">Quaisquer informações contidas neste e-mail e anexos podem ser confidenciais e privilegiadas, protegidas por sigilo legal. Qualquer forma de utilização deste documento depende de autorização do emissor, sujeito as penalidades cabíveis.</p><p style="font-size:10px;margin-top:10px">Any information in this e-mail and attachments may be confidential and privileged, protected by legal confidentiality. The use of this document require authorization by the issuer, subject to penalties.</p></td></tr></tbody></table><br style="color:rgb(0,0,0);font-family:Arial;font-size:medium"></div></div></div>
</div>