loggerhead: alternative web front-end
Robey Pointer
robey at lag.net
Mon Dec 25 05:50:58 GMT 2006
On 19 Dec 2006, at 23:37, Aaron Bentley wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Robey Pointer wrote:
>> On 19 Dec 2006, at 1:18, James Henstridge wrote:
>>> It'd probably be better
>>> to save the head revision ID in the cache and compare the that
>>> instead. What do you think?
>>
>> Obviously, you're right. :) I'm going to do that right now, while I
>> refactor that caching code. I think if the sizes are the same
>> *and* the
>> head revision is in the cache, then it's up to date.
>
> We're pretty aggressive these days about ensuring the revision history
> is normalized. You can assume that if the last_revision is the same,
> the length of revision_history is the same.
It ended up being a little more complicated. Because the cache is
built from most-recent revision backwards, having the most-recent
revision in the cache doesn't necessarily mean we have them all.
It's built backwards because the most-recent revisions are the most
likely to be hit on pages first, so the cache can have maximal effect
during the first few minutes of building.
So currently it assumes if (last_revid in cache) and (len(cache) >=
len(revision_graph)) then the cache is probably full.
robey
More information about the bazaar
mailing list