Add cache.py containing DiskCache and TarballCache.
Contains implementations of a generic concurrent DiskCache, as well as
a TarballCache for caching extracted tarball contents.
DiskCache will eventually support LRU pruning.
Updates gs.FetchGSUtil to use the cache. The main usage case is by the
'cros chrome-sdk' command, added in CL:39744.
BUG=None
TEST=CL:39744 unit tests.
Change-Id: I7df761e583aeeb123d001751580f3929e89ac847
Reviewed-on: https://gerrit.chromium.org/gerrit/41773
Reviewed-by: David James <davidjames@chromium.org>
Tested-by: Ryan Cui <rcui@chromium.org>
Commit-Queue: Ryan Cui <rcui@chromium.org>
diff --git a/scripts/cbuildbot.py b/scripts/cbuildbot.py
index 9c8a9fe..aacdb86 100644
--- a/scripts/cbuildbot.py
+++ b/scripts/cbuildbot.py
@@ -1236,7 +1236,7 @@
if not options.resume:
# If we're in resume mode, use our parents tempdir rather than
# nesting another layer.
- stack.Add(osutils.TempDirContextManager, 'cbuildbot-tmp')
+ stack.Add(osutils.TempDirContextManager, prefix='cbuildbot-tmp')
logging.debug("Cbuildbot tempdir is %r.", os.environ.get('TMP'))
# TODO(ferringb): update this once https://gerrit.chromium.org/gerrit/25359