This could be clever, if it's done properly. It'd have to be something along the lines of "this page won't ever change, unless you can create an sha1 hash collision", and we'd have to be certain that such pages then only use information out of that sha1 object, and not additional related objects that can be changed.<br>
<br><div class="gmail_quote">On Wed, Feb 5, 2014 at 11:18 AM, Lukas Fleischer <span dir="ltr"><<a href="mailto:cgit@cryptocrack.de" target="_blank">cgit@cryptocrack.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<br>
Reading through our caching code, I wondered why we don't make it a bit<br>
more clever. For every dynamically created page, we could just store a<br>
fingerprint that can be computed quite fast and indicates whether the<br>
cache slot is still up-to-date or not.<br>
<br>
For example, on the log pages, we could save the commit the<br>
corresponding ref points to and invalidate the cache slot when the ref<br>
has changed. Using that, we could use the power of caching and never<br>
deliver outdated pages at the same time.<br>
<br>
What do you think about that?<br>
<br>
Regards,<br>
Lukas<br>
_______________________________________________<br>
CGit mailing list<br>
<a href="mailto:CGit@lists.zx2c4.com">CGit@lists.zx2c4.com</a><br>
<a href="http://lists.zx2c4.com/mailman/listinfo/cgit" target="_blank">http://lists.zx2c4.com/mailman/listinfo/cgit</a><br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>Jason A. Donenfeld<br>Deep Space Explorer<br>fr: +33 6 51 90 82 66<br>us: +1 513 476 1200<br><a href="http://www.jasondonenfeld.com" target="_blank">www.jasondonenfeld.com</a>