<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Aug 6, 2014 at 8:47 AM, itpp2012 <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us" target="_blank">nginx-forum@nginx.us</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">keys_zone is memory, the other a 'file' path, I could imagine a 'cachehash'<br>
used could overwrite the other.<br></blockquote><div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline"><br>​I thought of that​, but learning how variables are resolved at request time, and knowing that configuration is parsed on HUP signal, I though nginx would handle cache requests from different servers/locations the same way it is dealing with them when they are coming from the same server.<br>

<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">I have not digged into the code, and I do not know if there is such thing sa a 'cache manager' which would centralize cache management and respond to cache events.<br>

<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">keys_zone are normally enough to avoid overwriting cache entries from other zones.<br>Failing to do so, it would mean several keys_zone being used in the same cache are not isolated and can lead to collision... that would be catastrophic...<br>

</div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">From the assumption that keys_zone are collision-free, it would seem reasonable to share the same cache file over several calls.<br>

<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">IMHO, the only thing that shall fail is the use of the same keys_zone on the same file more than once.<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">

Does not that sound reasonable?<br></div><div class="gmail_default" style="font-size:small;color:rgb(51,51,153);display:inline">​---<br><div><font size="1"><span style="color:rgb(102,102,102)"></span><b><span style="color:rgb(102,102,102)">B. R.</span></b><span style="color:rgb(102,102,102)"></span></font></div>


</div></div></div></div></div>