From 88f0a35ba71044b84161e3d8d9e6bbb1314118cd Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Thu, 6 Nov 2014 15:55:19 +0000 Subject: Add an LRU cache for resolved tree refs This uses the PyLRU module, from: . Python 3.2 and newer provide a built-in LRU cache, but this is specifically for in-memory use. See . Git commits are immutable, so caching information about their contents is fairly easy and trouble-free. There's no danger of the cache becoming stale. --- morphlib/buildcommand.py | 1 + 1 file changed, 1 insertion(+) (limited to 'morphlib/buildcommand.py') diff --git a/morphlib/buildcommand.py b/morphlib/buildcommand.py index a22e689b..d121b895 100644 --- a/morphlib/buildcommand.py +++ b/morphlib/buildcommand.py @@ -96,6 +96,7 @@ class BuildCommand(object): self.app.status(msg='Creating source pool', chatty=True) srcpool = morphlib.sourceresolver.create_source_pool( self.lrc, self.rrc, repo_name, ref, filename, + cachedir=self.app.settings['cachedir'], original_ref=original_ref, update_repos=not self.app.settings['no-git-update'], status_cb=self.app.status) -- cgit v1.2.1