repository caching

Mads Kiilerich mads at kiilerich.com
Tue Sep 1 21:01:52 UTC 2015


On 09/01/2015 07:55 PM, Andrew Shadura wrote:
> Hello everyone,
>
> I was reading kallithea/model/db.py and trying to understand what
> Repository.update_changeset_cache does. It seems, it gets the last
> changeset from the repository, and if it's the same cache thinks it is,
> it does nothing, otherwise it updates the database. Is getting the last
> changeset really such an expensive operation we want to do rarely? It
> seems to me that this sort of caching is doing more harm than good. We
> should probably call update_changeset_cache more often or, maybe, call
> it every time we access the changeset cache, so any inconsistencies are
> detected immediately.
>
> What do you think about it?

I think the cache will make a significant difference for example if you 
put 10 clones of a huge repo in a folder and browse the folder. I don't 
think we can do without the cache and still show the tip revision or 
number of changesets in the repo on the overview page. I think the info 
is valuable and nice to have but I don't have a _very_ strong opinion on 
that.

I think the cache is updated sufficiently often. We don't see any 
problems with the cache. But we do of course have to update the cache 
every time we update the repo outside Kallithea by calling paster 
update-repoinfo (and cache-keys). I don't think that is documented. It 
should be.

What specific problem do you see?

/Mads


More information about the kallithea-general mailing list